login
Header Space

 
 

[PATCH 04/25] Unionfs: cache-coherency fixes

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <akpm@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>, <viro@...>, <hch@...>, Olivier Blin <blino@...>, Erez Zadok <ezk@...>
Date: Tuesday, September 25, 2007 - 11:09 pm

From: Olivier Blin <blino@mandriva.com>

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>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
 fs/unionfs/fanout.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/unionfs/fanout.h b/fs/unionfs/fanout.h
index afeb9f6..51aa0de 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);
-- 
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL -mm] 00/25 Unionfs updates/cleanups/fixes, Erez Zadok, (Tue Sep 25, 11:09 pm)
[PATCH 02/25] Unionfs: Remove unused #defines, Erez Zadok, (Tue Sep 25, 11:09 pm)
[PATCH 04/25] Unionfs: cache-coherency fixes, Erez Zadok, (Tue Sep 25, 11:09 pm)
[PATCH 01/25] Unionfs: Simplify unionfs_get_nlinks, Erez Zadok, (Tue Sep 25, 11:09 pm)
[PATCH 06/25] Unionfs: minor coding style updates, Erez Zadok, (Tue Sep 25, 11:09 pm)
Re: [PATCH 05/25] Unionfs: cast page-&gt;index loff_t before..., Christoph Hellwig, (Wed Sep 26, 4:31 am)
speck-geostationary