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

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

Advertisement

Kernel v2.1.132 /fs/dcache.c

Filename:/fs/dcache.c
Lines Added:6
Lines Deleted:6
Also changed in: (Previous) 2.1.118  2.1.117  2.1.116  2.1.111  2.1.110  2.1.100 
(Following)

Location
[  2.1.132
  [  fs
     o  dcache.c

Patch

diff -u --recursive --new-file v2.1.131/linux/fs/dcache.c linux/fs/dcache.c
--- v2.1.131/linux/fs/dcache.c   Wed Aug 26 11:37:40 1998
+++ linux/fs/dcache.c   Mon Dec 21 14:11:24 1998
@@ -161,17 +161,17 @@
 
 /*
  * Try to invalidate the dentry if it turns out to be
- * possible. If there are other users of the dentry we
- * can't invalidate it.
+ * possible. If there are other dentries that can be
+ * reached through this one we can't delete it.
  */
 int d_invalidate(struct dentry * dentry)
 {
    /* Check whether to do a partial shrink_dcache */
-   if (!list_empty(&dentry->d_subdirs))
+   if (!list_empty(&dentry->d_subdirs)) {
       shrink_dcache_parent(dentry);
-
-   if (dentry->d_count != 1)
-      return -EBUSY;
+      if (!list_empty(&dentry->d_subdirs))
+         return -EBUSY;
+   }
 
    d_drop(dentry);
    return 0;


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