Unionfs: debugging updates
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 27 Nov 2007 00:53:58 +0000 (19:53 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 27 Nov 2007 00:53:58 +0000 (19:53 -0500)
Don't perform dentry+inode checks unless both are valid.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/debug.c

index 872e34eaa806094d0c41dd36c70d927740ade503..2f5723d29a661bc760924a71e76427541405ca69 100644 (file)
@@ -299,7 +299,7 @@ check_inode:
         * be NULL.  But, check that all three are NULL: lower dentry, mnt,
         * and inode.
         */
-       if (S_ISDIR(inode->i_mode))
+       if (dstart >= 0 && dend >= 0 && S_ISDIR(inode->i_mode))
                for (bindex = dstart+1; bindex < dend; bindex++) {
                        lower_inode = unionfs_lower_inode_idx(inode, bindex);
                        lower_dentry = unionfs_lower_dentry_idx(dentry,