diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-05-13 05:54:17 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-25 19:15:41 -0400 |
commit | b109eec6f4332bd517e2f41e207037c4b9065094 (patch) | |
tree | e8d0ee3812767d4b84310a7eba164068d96df9d0 | |
parent | ad15ec06e51b6eb73981428109e32c75cbad7d3d (diff) |
ceph: SetPageError() for writeback pages if writepages fails
Signed-off-by: Yan, Zheng <zyan@redhat.com>
-rw-r--r-- | fs/ceph/addr.c | 4 |
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) | |||
626 | struct ceph_fs_client *fsc = ceph_inode_to_client(inode); | 626 | struct ceph_fs_client *fsc = ceph_inode_to_client(inode); |
627 | bool remove_page; | 627 | bool remove_page; |
628 | 628 | ||
629 | |||
630 | dout("writepages_finish %p rc %d\n", inode, rc); | 629 | dout("writepages_finish %p rc %d\n", inode, rc); |
631 | if (rc < 0) | 630 | if (rc < 0) |
632 | mapping_set_error(mapping, rc); | 631 | mapping_set_error(mapping, rc); |
@@ -661,6 +660,9 @@ static void writepages_finish(struct ceph_osd_request *req) | |||
661 | clear_bdi_congested(&fsc->backing_dev_info, | 660 | clear_bdi_congested(&fsc->backing_dev_info, |
662 | BLK_RW_ASYNC); | 661 | BLK_RW_ASYNC); |
663 | 662 | ||
663 | if (rc < 0) | ||
664 | SetPageError(page); | ||
665 | |||
664 | ceph_put_snap_context(page_snap_context(page)); | 666 | ceph_put_snap_context(page_snap_context(page)); |
665 | page->private = 0; | 667 | page->private = 0; |
666 | ClearPagePrivate(page); | 668 | ClearPagePrivate(page); |