diff mbox series

[5/5] cifs: get rid of dead check in smb2_reconnect()

Message ID 20230329201423.32134-5-pc@manguebit.com
State New
Headers show
Series [1/5] cifs: get rid of cifs_mount_ctx::{origin,leaf}_fullpath | expand

Commit Message

Paulo Alcantara March 29, 2023, 8:14 p.m. UTC
The SMB2_IOCTL check in the switch statement will never be true as we
return earlier from smb2_reconnect() if @smb2_command == SMB2_IOCTL.

Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
---
 fs/cifs/smb2pdu.c | 1 -
 1 file changed, 1 deletion(-)

Comments

ronnie sahlberg March 29, 2023, 8:28 p.m. UTC | #1
reviewed-by me

On Thu, 30 Mar 2023 at 06:20, Paulo Alcantara <pc@manguebit.com> wrote:
>
> The SMB2_IOCTL check in the switch statement will never be true as we
> return earlier from smb2_reconnect() if @smb2_command == SMB2_IOCTL.
>
> Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
> ---
>  fs/cifs/smb2pdu.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index 6bd2aa6af18f..2b92132097dc 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -310,7 +310,6 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
>         case SMB2_READ:
>         case SMB2_WRITE:
>         case SMB2_LOCK:
> -       case SMB2_IOCTL:
>         case SMB2_QUERY_DIRECTORY:
>         case SMB2_CHANGE_NOTIFY:
>         case SMB2_QUERY_INFO:
> --
> 2.40.0
>
Steve French March 30, 2023, 10:59 p.m. UTC | #2
added ronnie's RB and merged into cifs-2.6.git for-next

On Wed, Mar 29, 2023 at 3:14 PM Paulo Alcantara <pc@manguebit.com> wrote:
>
> The SMB2_IOCTL check in the switch statement will never be true as we
> return earlier from smb2_reconnect() if @smb2_command == SMB2_IOCTL.
>
> Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
> ---
>  fs/cifs/smb2pdu.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index 6bd2aa6af18f..2b92132097dc 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -310,7 +310,6 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
>         case SMB2_READ:
>         case SMB2_WRITE:
>         case SMB2_LOCK:
> -       case SMB2_IOCTL:
>         case SMB2_QUERY_DIRECTORY:
>         case SMB2_CHANGE_NOTIFY:
>         case SMB2_QUERY_INFO:
> --
> 2.40.0
>
diff mbox series

Patch

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 6bd2aa6af18f..2b92132097dc 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -310,7 +310,6 @@  smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
 	case SMB2_READ:
 	case SMB2_WRITE:
 	case SMB2_LOCK:
-	case SMB2_IOCTL:
 	case SMB2_QUERY_DIRECTORY:
 	case SMB2_CHANGE_NOTIFY:
 	case SMB2_QUERY_INFO: