[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110510171245.GF18929@tux1.beaverton.ibm.com>
Date: Tue, 10 May 2011 10:12:45 -0700
From: "Darrick J. Wong" <djwong@...ibm.com>
To: Jan Kara <jack@...e.cz>
Cc: Theodore Tso <tytso@....edu>,
Alexander Viro <viro@...iv.linux.org.uk>,
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
Jens Axboe <axboe@...nel.dk>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Jeff Layton <jlayton@...hat.com>,
Dave Chinner <david@...morbit.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Christoph Hellwig <hch@...radead.org>, linux-mm@...ck.org,
Chris Mason <chris.mason@...cle.com>,
Joel Becker <jlbec@...lplan.org>,
linux-scsi <linux-scsi@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-ext4@...r.kernel.org, Mingming Cao <mcao@...ibm.com>
Subject: Re: [PATCH 2/7] fs: block_page_mkwrite should wait for writeback
to finish
For filesystems such as nilfs2 and xfs that use block_page_mkwrite, modify that
function to wait for pending writeback before allowing the page to become
writable. This is needed to stabilize pages during writeback for those two
filesystems.
Slight rework based on Jan Kara's suggestion.
Signed-off-by: Darrick J. Wong <djwong@...ibm.com>
---
fs/buffer.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index a08bb8e..0e7fa16 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2367,8 +2367,10 @@ block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
ret = VM_FAULT_OOM;
else /* -ENOSPC, -EIO, etc */
ret = VM_FAULT_SIGBUS;
- } else
+ } else {
+ wait_on_page_writeback(page);
ret = VM_FAULT_LOCKED;
+ }
out:
return ret;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists