diff options
author | David Howells <dhowells@redhat.com> | 2023-02-27 13:04:53 +0000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-03-01 18:18:25 -0600 |
commit | 0268792f77d2e4ba8e056173bdf2f9af9963be76 (patch) | |
tree | 85785aa47062fbbdf5f433cd89350a183861da98 /fs/cifs/file.c | |
parent | 410612b0726b2ee68808da7bd27103d96b4cf898 (diff) | |
download | linux-0268792f77d2e4ba8e056173bdf2f9af9963be76.tar.gz linux-0268792f77d2e4ba8e056173bdf2f9af9963be76.tar.bz2 linux-0268792f77d2e4ba8e056173bdf2f9af9963be76.zip |
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: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list")
Signed-off-by: David 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: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 879524bf7528..ec0694a65c7b 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2845,6 +2845,7 @@ err_xid: 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 { |