Commit 0268792f authored by David Howells's avatar David Howells Committed by Steve French

cifs: Fix cifs_write_back_from_locked_folio()

cifs_write_back_from_locked_folio() should return the number of bytes read,
but returns the result of ->async_writev(), which will be 0 on success.  As
it happens, this doesn't prevent cifs_writepages_region() from working as
it will then examine and ignore the pages that are no longer dirty rather
than just skipping over them.

Fixes: d08089f6 ("cifs: Change the I/O paths to use an iterator rather than a page list")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: Tom Talpey <tom@talpey.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 410612b0
......@@ -2845,6 +2845,7 @@ static ssize_t cifs_write_back_from_locked_folio(struct address_space *mapping,
free_xid(xid);
if (rc == 0) {
wbc->nr_to_write = count;
rc = len;
} else if (is_retryable_error(rc)) {
cifs_pages_write_redirty(inode, start, len);
} else {
......
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