Unionfs: improve debugging in copy_attr_times
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 12 Aug 2011 02:37:37 +0000 (22:37 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/subr.c

index 68a628065fcc14ddc275b9183bfb9567635968cf..1a40f63ffbbdd4b2b1e4ff30dd2bd6ceb3d3d630 100644 (file)
@@ -247,8 +247,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)