Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760300AbXIZDg2 (ORCPT ); Tue, 25 Sep 2007 23:36:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759743AbXIZDdm (ORCPT ); Tue, 25 Sep 2007 23:33:42 -0400 Received: from filer.fsl.cs.sunysb.edu ([130.245.126.2]:35480 "EHLO filer.fsl.cs.sunysb.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759672AbXIZDdk (ORCPT ); Tue, 25 Sep 2007 23:33:40 -0400 From: Erez Zadok To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, hch@infradead.org, Olivier Blin , Erez Zadok Subject: [PATCH 04/25] Unionfs: cache-coherency fixes Date: Tue, 25 Sep 2007 23:09:43 -0400 Message-Id: <1190776206791-git-send-email-ezk@cs.sunysb.edu> X-Mailer: git-send-email 1.5.2.2 X-MailKey: Erez_Zadok In-Reply-To: <11907762042481-git-send-email-ezk@cs.sunysb.edu> References: <11907762042481-git-send-email-ezk@cs.sunysb.edu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1080 Lines: 33 From: Olivier Blin 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 Signed-off-by: Erez Zadok --- 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/