Skip to content

Commit 0268792

Browse files
dhowellssmfrench
authored andcommitted
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: d08089f ("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>
1 parent 410612b commit 0268792

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/cifs/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,6 +2845,7 @@ static ssize_t cifs_write_back_from_locked_folio(struct address_space *mapping,
28452845
free_xid(xid);
28462846
if (rc == 0) {
28472847
wbc->nr_to_write = count;
2848+
rc = len;
28482849
} else if (is_retryable_error(rc)) {
28492850
cifs_pages_write_redirty(inode, start, len);
28502851
} else {

0 commit comments

Comments
 (0)