Messages in this thread | | | Date | Fri, 20 May 2005 15:47:37 +0100 | From | Al Viro <> | Subject | Re: [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 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/
| |