invariants: don't complain if no lower dentry of a deleted dentry
authorErez_Zadok <ezk@cs.sunysb.edu>
Tue, 29 May 2007 03:24:58 +0000 (23:24 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Wed, 30 Mar 2011 23:20:43 +0000 (19:20 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/debug.c

index 821ef653238895961ddd356c1f262ca18cca5593..ab168cc690973a98a5877ab265e56877991766bd 100644 (file)
@@ -148,9 +148,10 @@ void __unionfs_check_dentry(const struct dentry *dentry,
        /*
         * Directories can have NULL lower inodes in b/t start/end, but NOT
         * if at the start/end range.  Ignore this rule, however, if this is
-        * a NULL dentry.
+        * a NULL dentry or a deleted dentry.
         */
-       if (inode && !(inode && S_ISDIR(inode->i_mode) &&
+       if (!d_deleted((struct dentry *) dentry) &&
+           inode && !(inode && S_ISDIR(inode->i_mode) &&
                       bindex > dstart && bindex < dend)) {
          PRINT_CALLER;
          printk(" CD2: dentry/lower=%p:%p(%p) bindex=%d dstart/end=%d:%d\n",