ext4: wait for writeback to complete while making pages writable
authorDarrick J. Wong <djwong@us.ibm.com>
Wed, 18 May 2011 17:55:20 +0000 (13:55 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 18 May 2011 17:55:20 +0000 (13:55 -0400)
commit0e499890c1fd9e0a1bed02002161c4c7873d7489
tree9d45cdd242f399837fd208c39e964ef022703e54
parent7cb1a5351da8ac499d965a78e94c79ad27891f43
ext4: wait for writeback to complete while making pages writable

In order to stabilize pages during disk writes, ext4_page_mkwrite must
wait for writeback operations to complete before making a page
writable.  Furthermore, the function must return locked pages, and
recheck the writeback status if the page lock is ever dropped.  The
"someone could wander in" part of this patch was suggested by Chris
Mason.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/inode.c