From 2d4e72a25411fe1f22f7b96e3f35b5dd0122a3ff Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 7 Jul 2005 17:57:24 -0700 Subject: [PATCH] --- yaml --- r: 4292 b: refs/heads/master c: a4d70278610e6bebe44a7b59a469fe7391387da6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/namespace.c | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 7b11d2ce326a..8a2225d9e8e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1ce88cf466f7b6078b14d67d186a3d7c19dd5609 +refs/heads/master: a4d70278610e6bebe44a7b59a469fe7391387da6 diff --git a/trunk/fs/namespace.c b/trunk/fs/namespace.c index 9d17541ebafa..ea555a36c314 100644 --- a/trunk/fs/namespace.c +++ b/trunk/fs/namespace.c @@ -880,24 +880,13 @@ void mark_mounts_for_expiry(struct list_head *mounts) /* check that it is still dead: the count should now be 2 - as * contributed by the vfsmount parent and the mntget above */ if (atomic_read(&mnt->mnt_count) == 2) { - struct vfsmount *xdmnt; - struct dentry *xdentry; + struct nameidata old_nd; /* delete from the namespace */ list_del_init(&mnt->mnt_list); - list_del_init(&mnt->mnt_child); - list_del_init(&mnt->mnt_hash); - mnt->mnt_mountpoint->d_mounted--; - - xdentry = mnt->mnt_mountpoint; - mnt->mnt_mountpoint = mnt->mnt_root; - xdmnt = mnt->mnt_parent; - mnt->mnt_parent = mnt; - + detach_mnt(mnt, &old_nd); spin_unlock(&vfsmount_lock); - - mntput(xdmnt); - dput(xdentry); + path_release(&old_nd); /* now lay it to rest if this was the last ref on the * superblock */