From 94b7d0296f10782c84ca11574cde999a3db6f0f5 Mon Sep 17 00:00:00 2001 From: Erez_Zadok Date: Wed, 19 Sep 2007 23:52:18 -0400 Subject: [PATCH] Unionfs: cache-coherency fixes 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 Acked-by: Erez Zadok --- fs/unionfs/fanout.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/unionfs/fanout.h b/fs/unionfs/fanout.h index afeb9f646b1..51aa0de12ff 100644 --- a/fs/unionfs/fanout.h +++ b/fs/unionfs/fanout.h @@ -308,7 +308,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); -- 2.43.0