Patch "smb: fix bytes written value in /proc/fs/cifs/Stats" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    smb: fix bytes written value in /proc/fs/cifs/Stats

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     smb-fix-bytes-written-value-in-proc-fs-cifs-stats.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d2bab391b5c0253b29e44d30e0b9932787e7c761
Author: Bharath SM <bharathsm.hsk@xxxxxxxxx>
Date:   Thu Dec 19 23:28:50 2024 +0530

    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@xxxxxxxxxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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 @@ SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,
 		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,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux