Unionfs: debugging updates
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 13 Nov 2007 01:35:58 +0000 (20:35 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 29 Apr 2011 02:25:17 +0000 (22:25 -0400)
Don't perform dentry+inode checks unless both are valid.

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

index 0066ccd9ec7496943ae70aa60da5b03810b6e971..8464fbba7f0a1cc6c9478c881765d525c3d99185 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,