Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758130AbZAMMmT (ORCPT ); Tue, 13 Jan 2009 07:42:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754147AbZAMMmF (ORCPT ); Tue, 13 Jan 2009 07:42:05 -0500 Received: from styx.suse.cz ([82.119.242.94]:58005 "EHLO mail.suse.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754007AbZAMMmD (ORCPT ); Tue, 13 Jan 2009 07:42:03 -0500 From: Jan Kara To: linux-ext4@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Andrew Morton , Jan Kara , Pavel Machek Subject: [PATCH] ext2: Update also inode on disk when dir is IS_DIRSYNC Date: Tue, 13 Jan 2009 13:42:02 +0100 Message-Id: <1231850522-11074-1-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.6.0.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1108 Lines: 39 We used to just write changed page for IS_DIRSYNC inodes. But we also have to update directory inode itself just for the case that we've allocated a new block and changed i_size. Signed-off-by: Jan Kara CC: Pavel Machek --- fs/ext2/dir.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Andrew, would you please merge the patch? Ext3 and ext4 don't have this problem BTW. diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 9a0fc40..7fba549 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -94,11 +94,10 @@ static int ext2_commit_chunk(struct page *page, loff_t pos, unsigned len) i_size_write(dir, pos+len); mark_inode_dirty(dir); } + unlock_page(page); if (IS_DIRSYNC(dir)) - err = write_one_page(page, 1); - else - unlock_page(page); + err = ext2_sync_inode(dir); return err; } -- 1.6.0.4 -- 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/