[<prev] [next>] [day] [month] [year] [list]
Message-ID: <42699172-eec2-427a-96f9-a687760dcaeb@web.de>
Date: Thu, 9 Oct 2025 10:21:04 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
Bharath SM <bharathsm@...rosoft.com>, Paulo Alcantara <pc@...guebit.org>,
Ronnie Sahlberg <ronniesahlberg@...il.com>,
Shyam Prasad N <sprasad@...rosoft.com>, Steve French <sfrench@...ba.org>,
Tom Talpey <tom@...pey.com>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org
Subject: [PATCH] smb: client: Use more common code in smb311_posix_mkdir()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 9 Oct 2025 10:08:04 +0200
Use an additional label so that a bit of common code can be better reused
at the end of this function implementation.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
fs/smb/client/smb2pdu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
index 42e2d4ea344d..3a62a3a35580 100644
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -2975,8 +2975,7 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
rsp = (struct smb2_create_rsp *)rsp_iov.iov_base;
if (rsp == NULL) {
rc = -EIO;
- kfree(pc_buf);
- goto err_free_req;
+ goto err_free_pc_buf;
}
trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, ses->Suid,
@@ -2988,6 +2987,7 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
err_free_rsp_buf:
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
+err_free_pc_buf:
kfree(pc_buf);
err_free_req:
cifs_small_buf_release(req);
--
2.51.0
Powered by blists - more mailing lists