xfs: do not discard page cache data on EAGAIN
authorChristoph Hellwig <hch@infradead.org>
Tue, 24 Aug 2010 01:47:51 +0000 (11:47 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 24 Aug 2010 01:47:51 +0000 (11:47 +1000)
commitb5420f235953448eeae615b3361584dc5e414f34
tree7c28ca9ee8a78d3d2a881a9269cd04ce88480e57
parent3b93c7aaefc05ee2a75e2726929b01a321402984
xfs: do not discard page cache data on EAGAIN

If xfs_map_blocks returns EAGAIN because of lock contention we must redirty the
page and not disard the pagecache content and return an error from writepage.
We used to do this correctly, but the logic got lost during the recent
reshuffle of the writepage code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Mike Gao <ygao.linux@gmail.com>
Tested-by: Mike Gao <ygao.linux@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/linux-2.6/xfs_aops.c