summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-05-13 17:54:17 +0800
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 01:15:41 +0200
commitb109eec6f4332bd517e2f41e207037c4b9065094 (patch)
treee8d0ee3812767d4b84310a7eba164068d96df9d0 /fs
parentad15ec06e51b6eb73981428109e32c75cbad7d3d (diff)
ceph: SetPageError() for writeback pages if writepages fails
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/addr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 080a9cab3ee1..8fa1f91cbf16 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -626,7 +626,6 @@ static void writepages_finish(struct ceph_osd_request *req)
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
bool remove_page;
-
dout("writepages_finish %p rc %d\n", inode, rc);
if (rc < 0)
mapping_set_error(mapping, rc);
@@ -661,6 +660,9 @@ static void writepages_finish(struct ceph_osd_request *req)
clear_bdi_congested(&fsc->backing_dev_info,
BLK_RW_ASYNC);
+ if (rc < 0)
+ SetPageError(page);
+
ceph_put_snap_context(page_snap_context(page));
page->private = 0;
ClearPagePrivate(page);