Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit a88d609

Browse files
dhowellsSteve French
authored andcommitted
cifs: Don't advance the I/O iterator before terminating subrequest
There's now no need to make sure subreq->io_iter is advanced to match subreq->transferred before calling one of the netfs subrequest termination functions as the check has been removed netfslib and the iterator is reset prior to retrying a subreq. Fixes: 3ee1a1f ("cifs: Cut over to using netfslib") Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <sfrench@samba.org> cc: Paulo Alcantara <pc@manguebit.com> cc: Shyam Prasad N <nspmangalore@gmail.com> cc: Rohith Surabattula <rohiths.msft@gmail.com> cc: Jeff Layton <jlayton@kernel.org> cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 02c4187 commit a88d609

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/smb/client/smb2pdu.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4577,8 +4577,6 @@ smb2_readv_callback(struct mid_q_entry *mid)
45774577
if (rdata->subreq.start < rdata->subreq.rreq->i_size)
45784578
rdata->result = 0;
45794579
}
4580-
if (rdata->result == 0 || rdata->result == -EAGAIN)
4581-
iov_iter_advance(&rdata->subreq.io_iter, rdata->got_bytes);
45824580
rdata->credits.value = 0;
45834581
netfs_subreq_terminated(&rdata->subreq,
45844582
(rdata->result == 0 || rdata->result == -EAGAIN) ?
@@ -4789,7 +4787,6 @@ smb2_writev_callback(struct mid_q_entry *mid)
47894787
wdata->result = -ENOSPC;
47904788
else
47914789
wdata->subreq.len = written;
4792-
iov_iter_advance(&wdata->subreq.io_iter, written);
47934790
break;
47944791
case MID_REQUEST_SUBMITTED:
47954792
case MID_RETRY_NEEDED:

0 commit comments

Comments
 (0)