Unionfs: improve debugging in copy_attr_times
authorErez Zadok <ezk@cs.sunysb.edu>
Sat, 16 Feb 2008 02:37:07 +0000 (21:37 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Sat, 16 Feb 2008 02:37:07 +0000 (21:37 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/subr.c

index 75e02672162f62573718fb0fa2536826813e3438..d284aa5857d819bc932bde77f89962fbc89853a5 100644 (file)
@@ -237,8 +237,14 @@ void unionfs_copy_attr_times(struct inode *upper)
        int bindex;
        struct inode *lower;
 
-       if (!upper || ibstart(upper) < 0)
+       if (!upper)
                return;
+       if (ibstart(upper) < 0) {
+#ifdef CONFIG_UNION_FS_DEBUG
+               WARN_ON(ibstart(upper) < 0);
+#endif /* CONFIG_UNION_FS_DEBUG */
+               return;
+       }
        for (bindex = ibstart(upper); bindex <= ibend(upper); bindex++) {
                lower = unionfs_lower_inode_idx(upper, bindex);
                if (!lower)