summaryrefslogtreecommitdiffstats
path: root/fs/smb
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-02-05 10:08:57 +0100
committerDavid Howells <dhowells@redhat.com>2024-05-01 19:08:19 +0200
commitdc5939de82f149633d6ec1c403003538442ec9ef (patch)
tree12b933217d1068be5a5acf8fe64f88771d717bd0 /fs/smb
parentcifs: Make wait_mtu_credits take size_t args (diff)
downloadlinux-dc5939de82f149633d6ec1c403003538442ec9ef.tar.xz
linux-dc5939de82f149633d6ec1c403003538442ec9ef.zip
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
Diffstat (limited to 'fs/smb')
-rw-r--r--fs/smb/client/file.c2
-rw-r--r--fs/smb/client/smb2pdu.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
index 4d8cd0d82104..7f2ce68d2a2a 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -3325,7 +3325,7 @@ cifs_resend_wdata(struct cifs_io_subrequest *wdata, struct list_head *wdata_list
if (wdata->cfile->invalidHandle)
rc = -EAGAIN;
else {
- wdata->replay = true;
+ set_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags);
#ifdef CONFIG_CIFS_SMB_DIRECT
if (wdata->mr) {
wdata->mr->need_invalidate = true;
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
index ca8ba6878f9f..b063f5e95f5d 100644
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -4832,7 +4832,7 @@ smb2_async_writev(struct cifs_io_subrequest *wdata)
struct cifs_io_parms *io_parms = NULL;
int credit_request;
- if (!wdata->server || wdata->replay)
+ if (!wdata->server || test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags))
server = wdata->server = cifs_pick_channel(tcon->ses);
/*
@@ -4917,7 +4917,7 @@ smb2_async_writev(struct cifs_io_subrequest *wdata)
rqst.rq_nvec = 1;
rqst.rq_iter = wdata->subreq.io_iter;
rqst.rq_iter_size = iov_iter_count(&rqst.rq_iter);
- if (wdata->replay)
+ if (test_bit(NETFS_SREQ_RETRYING, &wdata->subreq.flags))
smb2_set_replay(server, &rqst);
#ifdef CONFIG_CIFS_SMB_DIRECT
if (wdata->mr)