Skip to content

Commit dc5939d

Browse files
committed
cifs: Replace the writedata replay bool with a netfs sreq flag
Replace the 'replay' bool in cifs_writedata (now cifs_io_subrequest) with a flag in the netfs_io_subrequest flags. Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <sfrench@samba.org> 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
1 parent 5625733 commit dc5939d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

fs/smb/client/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,7 @@ cifs_resend_wdata(struct cifs_io_subrequest *wdata, struct list_head *wdata_list
33253325
if (wdata->cfile->invalidHandle)
33263326
rc = -EAGAIN;
33273327
else {
3328-
wdata->replay = true;
3328+
set_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags);
33293329
#ifdef CONFIG_CIFS_SMB_DIRECT
33303330
if (wdata->mr) {
33313331
wdata->mr->need_invalidate = true;

fs/smb/client/smb2pdu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4832,7 +4832,7 @@ smb2_async_writev(struct cifs_io_subrequest *wdata)
48324832
struct cifs_io_parms *io_parms = NULL;
48334833
int credit_request;
48344834

4835-
if (!wdata->server || wdata->replay)
4835+
if (!wdata->server || test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags))
48364836
server = wdata->server = cifs_pick_channel(tcon->ses);
48374837

48384838
/*
@@ -4917,7 +4917,7 @@ smb2_async_writev(struct cifs_io_subrequest *wdata)
49174917
rqst.rq_nvec = 1;
49184918
rqst.rq_iter = wdata->subreq.io_iter;
49194919
rqst.rq_iter_size = iov_iter_count(&rqst.rq_iter);
4920-
if (wdata->replay)
4920+
if (test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags))
49214921
smb2_set_replay(server, &rqst);
49224922
#ifdef CONFIG_CIFS_SMB_DIRECT
49234923
if (wdata->mr)

0 commit comments

Comments
 (0)