Unionfs: cache-coherency fixes
authorErez_Zadok <ezk@cs.sunysb.edu>
Tue, 27 Nov 2007 00:54:54 +0000 (19:54 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 27 Nov 2007 00:54:54 +0000 (19:54 -0500)
Do not update mtime if there is no upper branch for the inode.  This
prevents from calling unionfs_lower_inode_idx() with a negative index, which
triggers a bug.

Signed-off-by: Olivier Blin <blino@mandriva.com>
Acked-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/fanout.h

index e952f38540413b9457f779ff390b8b94ebced403..2691ec0c5d3da6875c6c720ee7fe762b90ed9bf0 100644 (file)
@@ -309,7 +309,7 @@ static inline void unionfs_copy_attr_times(struct inode *upper)
        int bindex;
        struct inode *lower;
 
-       if (!upper)
+       if (!upper || ibstart(upper) < 0)
                return;
        for (bindex=ibstart(upper); bindex <= ibend(upper); bindex++) {
                lower = unionfs_lower_inode_idx(upper, bindex);