* [PATCH] smb: client: Omit an if branch in smb2_find_smb_tcon()
@ 2025-10-09 15:12 Markus Elfring
2025-10-09 15:43 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2025-10-09 15:12 UTC (permalink / raw)
To: linux-cifs, samba-technical, Bharath SM, Enzo Matsumiya,
Paulo Alcantara, Pavel Shilovsky, Ronnie Sahlberg, Sachin Prabhu,
Shyam Prasad N, Steve French, Tom Talpey
Cc: LKML, kernel-janitors
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] smb: client: Omit an if branch in smb2_find_smb_tcon()
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
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2025-10-09 15:43 UTC (permalink / raw)
To: Markus Elfring
Cc: linux-cifs, samba-technical, Bharath SM, Enzo Matsumiya,
Paulo Alcantara, Pavel Shilovsky, Ronnie Sahlberg, Sachin Prabhu,
Shyam Prasad N, Steve French, Tom Talpey, LKML, kernel-janitors
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-09 15:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®