Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759605AbZCQSuY (ORCPT ); Tue, 17 Mar 2009 14:50:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757435AbZCQSuJ (ORCPT ); Tue, 17 Mar 2009 14:50:09 -0400 Received: from mx1.suse.de ([195.135.220.2]:34710 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757025AbZCQSuI (ORCPT ); Tue, 17 Mar 2009 14:50:08 -0400 From: Jan Kara To: LKML Cc: linux-ext4@vger.kernel.org, Jan Kara Subject: [PATCH 1/4] ext3: Fix false EIO errors Date: Tue, 17 Mar 2009 18:33:52 +0100 Message-Id: <1237311235-13623-2-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1237311235-13623-1-git-send-email-jack@suse.cz> References: <1237311235-13623-1-git-send-email-jack@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 33 When machine is under heavy memory pressure, it can happen that the page we want to copy data from is paged out from memory before we copy data from it and thus we are called with copied == 0. Generally, we should not file buffers into journal lists if the don't really contain uptodate data. So fix the range of buffers we file to journal list to contain only buffers with copied data. Signed-off-by: Jan Kara --- fs/ext3/inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 5fa453b..62005c0 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -1261,7 +1261,7 @@ static int ext3_ordered_write_end(struct file *file, int ret = 0, ret2; from = pos & (PAGE_CACHE_SIZE - 1); - to = from + len; + to = from + copied; ret = walk_page_buffers(handle, page_buffers(page), from, to, NULL, ext3_journal_dirty_data); -- 1.6.0.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/