diff options
author | 2024-12-19 23:28:50 +0530 | |
---|---|---|
committer | 2024-12-19 12:14:11 -0600 | |
commit | 92941c7f2c9529fac1b2670482d0ced3b46eac70 (patch) | |
tree | 825d3d9a6755da4126272f115339726708fc5b97 | |
parent | smb: client: fix TCP timers deadlock after rmmod (diff) | |
download | wireguard-linux-92941c7f2c9529fac1b2670482d0ced3b46eac70.tar.xz wireguard-linux-92941c7f2c9529fac1b2670482d0ced3b46eac70.zip |
smb: fix bytes written value in /proc/fs/cifs/Stats
With recent netfs apis changes, the bytes written
value was not getting updated in /proc/fs/cifs/Stats.
Fix this by updating tcon->bytes in write operations.
Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib")
Signed-off-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r-- | fs/smb/client/smb2pdu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index c945b94318f8..959359301250 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -4840,6 +4840,8 @@ smb2_writev_callback(struct mid_q_entry *mid) if (written > wdata->subreq.len) written &= 0xFFFF; + cifs_stats_bytes_written(tcon, written); + if (written < wdata->subreq.len) wdata->result = -ENOSPC; else @@ -5156,6 +5158,7 @@ replay_again: cifs_dbg(VFS, "Send error in write = %d\n", rc); } else { *nbytes = le32_to_cpu(rsp->DataLength); + cifs_stats_bytes_written(io_parms->tcon, *nbytes); trace_smb3_write_done(0, 0, xid, req->PersistentFileId, io_parms->tcon->tid, |