commit bd03b6a1e71e23ce8d27ac559f9b5161c153f0b5
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date:   Mon May 28 19:47:35 2007 -0400

    invariants: don't complain about directories with some NULL lower objects
    
    Directories can have NULL lower objects in between start/end, but NOT if at
    the start/end range.  We cannot verify that this dentry is a type=DIR,
    because it may already be a negative dentry.  But if dbstart is greater than
    dbend, we know that this couldn't have been a regular file: it had to have
    been a directory.  In that case, don't complain about NULL lower objects in
    in between start/end.
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 614d233..8daa7e4 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -497,9 +497,19 @@ static inline void unionfs_mntput(struct dentry *dentry, 
int bindex)
                        return;
                if (!mnt && bindex >= 0) {
 #ifdef UNIONFS_DEBUG
-                       printk(KERN_DEBUG
-                              "unionfs_mntput: mnt=%p bindex=%d\n",
-                              mnt, bindex);
+                       /*
+                        * Directories can have NULL lower objects in
+                        * between start/end, but NOT if at the start/end
+                        * range.  We cannot verify that this dentry is a
+                        * type=DIR, because it may already be a negative
+                        * dentry.  But if dbstart is greater than dbend, we
+                        * know that this couldn't have been a regular file:
+                        * it had to have been a directory.
+                        */
+                       if (!(bindex > dbstart(dentry) && bindex < 
dbend(dentry)))
+                               printk(KERN_WARNING
+                                      "unionfs_mntput: mnt=%p bindex=%d\n",
+                                      mnt, bindex);
 #endif /* UNIONFS_DEBUG */
                        return;
                }
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to