lkml.org 
[lkml]   [2006]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Busy inodes after unmount, be more verbose in generic_shutdown_super
Hello Jan,

>>Jan, I still have not heard a single comment about what's wrong with
>>it... I would really appreciate if you provide me one.
>>
>
>
> Sorry for the delay. I had to fix a totally bogus patch (mine ;).
>
> The problem with your patch is that it hides too early mntput's. Think about
> following situation:
>
> mntput(path->mnt); // too early mntput()
> dput(path->dentry);
>
> Assuming that in-between this sequence someone unmounts the file system, your
> patch will wait for this dput() to finish before it proceeds with unmounting
> the file system. I think this isn't what we want.
No, it won't wait for anything, because if umount happened between
mntput/dput, dentry is not in s_dshrinkers list.
if umount happens in parallell with dput() (where shrinker operations
are), then it will behave ok - will wait for dput() and then umount. It
was intended behaviour!

Also, please, note that such early mntput()'s are bugs!!! because such
dentries can reference freed memory after last mntput(). And I remember
some patches in 2.4.x/2.6.x which fixed this sequence everywhere.

Kirill

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-30 15:06    [W:0.258 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site