Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.12 /fs/namespace.c

Filename:/fs/namespace.c
Lines Added:5
Lines Deleted:6
Also changed in: (Previous) 2.4.11  2.4.11-pre6  2.4.11-pre5  2.4.11-pre4  2.4.10-ac12  2.4.10-ac11 
(Following) 2.4.12-ac1  2.4.12-ac2  2.4.12-ac3  2.4.12-ac4  2.4.12-ac5  2.4.12-ac6 

Location
[  2.4.12
  [  fs
     o  namespace.c

Patch

diff -u --recursive --new-file v2.4.11/linux/fs/namespace.c linux/fs/namespace.c
--- v2.4.11/linux/fs/namespace.c   Tue Oct  9 17:06:53 2001
+++ linux/fs/namespace.c   Wed Oct 10 15:39:04 2001
@@ -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);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.