From: Steve French <smfrench@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
Bharath SM <bharathsm@microsoft.com>,
Enzo Matsumiya <ematsumiya@suse.de>,
Paulo Alcantara <pc@manguebit.org>,
Pavel Shilovsky <pshilov@microsoft.com>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Sachin Prabhu <sprabhu@redhat.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Steve French <sfrench@samba.org>, Tom Talpey <tom@talpey.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] smb: client: Omit an if branch in smb2_find_smb_tcon()
Date: Thu, 9 Oct 2025 10:43:09 -0500 [thread overview]
Message-ID: <CAH2r5ms+S+G-wjB1MPTp1G6MyVLf+yzq6r+_Yg9PLb6HmDCtYw@mail.gmail.com> (raw)
In-Reply-To: <7a5c4b6d-f15e-4071-8a82-dca6b71b6b4b@web.de>
merged into cifs-2.6.git for-next
On Thu, Oct 9, 2025 at 10:12 AM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 9 Oct 2025 17:00:13 +0200
>
> Statements from an if branch and the end of this function implementation
> were equivalent.
> Thus delete duplicate source code.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> fs/smb/client/smb2transport.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/fs/smb/client/smb2transport.c b/fs/smb/client/smb2transport.c
> index bc0e92eb2b64..33f33013b392 100644
> --- a/fs/smb/client/smb2transport.c
> +++ b/fs/smb/client/smb2transport.c
> @@ -240,11 +240,6 @@ smb2_find_smb_tcon(struct TCP_Server_Info *server, __u64 ses_id, __u32 tid)
> return NULL;
> }
> tcon = smb2_find_smb_sess_tcon_unlocked(ses, tid);
> - if (!tcon) {
> - spin_unlock(&cifs_tcp_ses_lock);
> - cifs_put_smb_ses(ses);
> - return NULL;
> - }
> spin_unlock(&cifs_tcp_ses_lock);
> /* tcon already has a ref to ses, so we don't need ses anymore */
> cifs_put_smb_ses(ses);
> --
> 2.51.0
>
>
--
Thanks,
Steve
prev parent reply other threads:[~2025-10-09 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 15:12 [PATCH] smb: client: Omit an if branch in smb2_find_smb_tcon() Markus Elfring
2025-10-09 15:43 ` Steve French [this message]
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=CAH2r5ms+S+G-wjB1MPTp1G6MyVLf+yzq6r+_Yg9PLb6HmDCtYw@mail.gmail.com \
--to=smfrench@gmail.com \
--cc=Markus.Elfring@web.de \
--cc=bharathsm@microsoft.com \
--cc=ematsumiya@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=pshilov@microsoft.com \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=sprabhu@redhat.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).