diff options
| author | Bharath SM <bharathsm.hsk@gmail.com> | 2024-12-19 23:28:50 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-02 10:34:11 +0100 |
| commit | 987cf3869d7763a31fd808409ab03a6283952072 (patch) | |
| tree | 2a278d0c7b9528bab110c9699f00734d69cfba32 /fs | |
| parent | 825aaa75f7859838c1fb2de1746b86991f7b687a (diff) | |
| download | linux-987cf3869d7763a31fd808409ab03a6283952072.tar.gz linux-987cf3869d7763a31fd808409ab03a6283952072.tar.bz2 linux-987cf3869d7763a31fd808409ab03a6283952072.zip | |
smb: fix bytes written value in /proc/fs/cifs/Stats
[ Upstream commit 92941c7f2c9529fac1b2670482d0ced3b46eac70 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
| -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 d1bd69cbfe09..4750505465ae 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -4855,6 +4855,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 @@ -5171,6 +5173,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, |
