lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH2r5ms+S+G-wjB1MPTp1G6MyVLf+yzq6r+_Yg9PLb6HmDCtYw@mail.gmail.com>
Date: Thu, 9 Oct 2025 10:43:09 -0500
From: Steve French <smfrench@...il.com>
To: Markus Elfring <Markus.Elfring@....de>
Cc: linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org, 
	Bharath SM <bharathsm@...rosoft.com>, Enzo Matsumiya <ematsumiya@...e.de>, 
	Paulo Alcantara <pc@...guebit.org>, Pavel Shilovsky <pshilov@...rosoft.com>, 
	Ronnie Sahlberg <ronniesahlberg@...il.com>, Sachin Prabhu <sprabhu@...hat.com>, 
	Shyam Prasad N <sprasad@...rosoft.com>, Steve French <sfrench@...ba.org>, Tom Talpey <tom@...pey.com>, 
	LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] smb: client: Omit an if branch in smb2_find_smb_tcon()

merged into cifs-2.6.git for-next

On Thu, Oct 9, 2025 at 10:12 AM Markus Elfring <Markus.Elfring@....de> wrote:
>
> From: Markus Elfring <elfring@...rs.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@...rs.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ