Commit 97b37f24 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

cifs: set mapping error when page writeback fails in writepage or launder_pages

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent 1955880b
...@@ -2234,14 +2234,16 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc) ...@@ -2234,14 +2234,16 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc)
set_page_writeback(page); set_page_writeback(page);
retry_write: retry_write:
rc = cifs_partialpagewrite(page, 0, PAGE_SIZE); rc = cifs_partialpagewrite(page, 0, PAGE_SIZE);
if (rc == -EAGAIN && wbc->sync_mode == WB_SYNC_ALL) if (rc == -EAGAIN) {
goto retry_write; if (wbc->sync_mode == WB_SYNC_ALL)
else if (rc == -EAGAIN) goto retry_write;
redirty_page_for_writepage(wbc, page); redirty_page_for_writepage(wbc, page);
else if (rc != 0) } else if (rc != 0) {
SetPageError(page); SetPageError(page);
else mapping_set_error(page->mapping, rc);
} else {
SetPageUptodate(page); SetPageUptodate(page);
}
end_page_writeback(page); end_page_writeback(page);
put_page(page); put_page(page);
free_xid(xid); free_xid(xid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment