From: Markus Elfring <Markus.Elfring@web.de>
To: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
Aurelien Aptel <aaptel@suse.com>,
Bharath SM <bharathsm@microsoft.com>,
Paulo Alcantara <pc@manguebit.org>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Steve French <sfrench@samba.org>, Tom Talpey <tom@talpey.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] smb: client: Return directly after a failed SMB2_ioctl() in smb3_simple_fallocate_range()
Date: Wed, 8 Oct 2025 20:46:40 +0200 [thread overview]
Message-ID: <8a91cb2c-4353-496e-8f16-2e700df692bd@web.de> (raw)
In-Reply-To: <98b5e2a8-4bc4-4282-987e-01cd6fcd8f00@web.de>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 8 Oct 2025 20:02:00 +0200
* Return directly after a call of the function “SMB2_ioctl” failed
at the beginning.
* Delete an initialisation for the local variable “out_data”
which became unnecessary with this refactoring.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/smb/client/smb2ops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index 7c3e96260fd4..ec188dedbf97 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -3537,7 +3537,7 @@ static int smb3_simple_fallocate_range(unsigned int xid,
struct cifsFileInfo *cfile,
loff_t off, loff_t len)
{
- struct file_allocated_range_buffer in_data, *out_data = NULL, *tmp_data;
+ struct file_allocated_range_buffer in_data, *out_data, *tmp_data;
u32 out_data_len;
char *buf = NULL;
loff_t l;
@@ -3552,7 +3552,7 @@ static int smb3_simple_fallocate_range(unsigned int xid,
1024 * sizeof(struct file_allocated_range_buffer),
(char **)&out_data, &out_data_len);
if (rc)
- goto out;
+ return rc;
buf = kzalloc(1024 * 1024, GFP_KERNEL);
if (buf == NULL) {
--
2.51.0
next prev parent reply other threads:[~2025-10-08 18:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 18:44 [PATCH 0/2] smb: client: Better exception handling in smb3_simple_fallocate_range() Markus Elfring
2025-10-08 18:46 ` Markus Elfring [this message]
2025-10-08 18:48 ` [PATCH 2/2] smb: client: Improve memory release " Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a91cb2c-4353-496e-8f16-2e700df692bd@web.de \
--to=markus.elfring@web.de \
--cc=aaptel@suse.com \
--cc=bharathsm@microsoft.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox