[lkml]   [2005]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] namespace.c: cleanup in mark_mounts_for_expiry()
On Fri, May 20, 2005 at 03:54:51PM +0200, Miklos Szeredi wrote:
> [ fell in love with that function, now can't let go... ]
> This patch simplifies mark_mounts_for_expiry() by using detach_mnt()
> instead of duplicating everything it does.
> It should be an equivalent transformation except for righting the
> dput/mntput order.

Looks sane. However, we still have a problem here - just what would
happen if vfsmount is detached while we were grabbing namespace
semaphore? Refcount alone is not useful here - we might be held by
whoever had detached the vfsmount. IOW, we should check that it's
still attached (i.e. that mnt->mnt_parent != mnt). If it's not -
just leave it alone, do mntput() and let whoever holds it deal with
the sucker. No need to put it back on lists.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-05-20 16:50    [W:0.047 / U:8.116 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site