Unionfs: improve debugging in copy_attr_times
authorRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Fri, 29 Feb 2008 17:03:39 +0000 (12:03 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Fri, 29 Feb 2008 17:03:39 +0000 (12:03 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/subr.c

index f68624d76e588906147257ed54703ad212a6ba07..167eac9d7f675a9b80e7649e9881ecbb8d33faf0 100644 (file)
@@ -88,8 +88,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)