patch-2.4.12 linux/fs/namespace.c
Next file: linux/fs/proc/base.c
Previous file: linux/fs/namei.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Wed Oct 10 15:39:04 2001
- Orig file:
v2.4.11/linux/fs/namespace.c
- Orig date:
Tue Oct 9 17:06:53 2001
diff -u --recursive --new-file v2.4.11/linux/fs/namespace.c linux/fs/namespace.c
@@ -336,9 +336,6 @@
struct vfsmount *p;
LIST_HEAD(kill);
- if (list_empty(&mnt->mnt_list))
- return;
-
for (p = mnt; p; p = next_mnt(p, mnt)) {
list_del(&p->mnt_list);
list_add(&p->mnt_list, &kill);
@@ -418,7 +415,8 @@
}
retval = -EBUSY;
if (atomic_read(&mnt->mnt_count) == 2 || flags & MNT_DETACH) {
- umount_tree(mnt);
+ if (!list_empty(&mnt->mnt_list))
+ umount_tree(mnt);
retval = 0;
}
spin_unlock(&dcache_lock);
@@ -592,9 +590,10 @@
if (mnt) {
err = graft_tree(mnt, nd);
- if (err && recurse)
+ if (err)
umount_tree(mnt);
- mntput(mnt);
+ else
+ mntput(mnt);
}
up(&mount_sem);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)