mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 09:31:26 +00:00
cifs: set mapping error when page writeback fails in writepage or launder_pages
Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
parent
1955880b2c
commit
97b37f2416
@ -2234,14 +2234,16 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc)
|
||||
set_page_writeback(page);
|
||||
retry_write:
|
||||
rc = cifs_partialpagewrite(page, 0, PAGE_SIZE);
|
||||
if (rc == -EAGAIN && wbc->sync_mode == WB_SYNC_ALL)
|
||||
goto retry_write;
|
||||
else if (rc == -EAGAIN)
|
||||
if (rc == -EAGAIN) {
|
||||
if (wbc->sync_mode == WB_SYNC_ALL)
|
||||
goto retry_write;
|
||||
redirty_page_for_writepage(wbc, page);
|
||||
else if (rc != 0)
|
||||
} else if (rc != 0) {
|
||||
SetPageError(page);
|
||||
else
|
||||
mapping_set_error(page->mapping, rc);
|
||||
} else {
|
||||
SetPageUptodate(page);
|
||||
}
|
||||
end_page_writeback(page);
|
||||
put_page(page);
|
||||
free_xid(xid);
|
||||
|
Loading…
Reference in New Issue
Block a user