Skip to content

Commit

Permalink
ceph: SetPageError() for writeback pages if writepages fails
Browse files Browse the repository at this point in the history
Signed-off-by: Yan, Zheng <zyan@redhat.com>
  • Loading branch information
ukernel authored and idryomov committed May 25, 2016
1 parent ad15ec0 commit b109eec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b109eec

Please sign in to comment.