* [PATCH] cifs: fix enum usage
@ 2022-03-28 13:03 trix
2022-03-28 16:07 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2022-03-28 13:03 UTC (permalink / raw)
To: sfrench, nathan, ndesaulniers
Cc: linux-cifs, samba-technical, linux-kernel, llvm, Tom Rix
From: Tom Rix <trix@redhat.com>
Clang build fails with
cifsfs.c:709:18: error: implicit conversion from enumeration
type 'enum statusEnum' to different enumeration
type 'enum tid_status_enum'
tcon->status = CifsExiting;
~ ^~~~~~~~~~~
The type of the element status changed, so enum needed to change.
Replace CifsExiting with TID_EXITING.
Fixes: 7e5c8c02911b ("smb3: cleanup and clarify status of tree connections")
Signed-off-by: Tom Rix <trix@redhat.com>
---
fs/cifs/cifsfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 0789bf1496c74..a47fa44b6d52b 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -706,7 +706,7 @@ static void cifs_umount_begin(struct super_block *sb)
spin_unlock(&cifs_tcp_ses_lock);
return;
} else if (tcon->tc_count == 1)
- tcon->status = CifsExiting;
+ tcon->status = TID_EXITING;
spin_unlock(&cifs_tcp_ses_lock);
/* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cifs: fix enum usage
2022-03-28 13:03 [PATCH] cifs: fix enum usage trix
@ 2022-03-28 16:07 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2022-03-28 16:07 UTC (permalink / raw)
To: trix; +Cc: sfrench, ndesaulniers, linux-cifs, samba-technical, linux-kernel,
llvm
On Mon, Mar 28, 2022 at 06:03:00AM -0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> Clang build fails with
> cifsfs.c:709:18: error: implicit conversion from enumeration
> type 'enum statusEnum' to different enumeration
> type 'enum tid_status_enum'
> tcon->status = CifsExiting;
> ~ ^~~~~~~~~~~
>
> The type of the element status changed, so enum needed to change.
> Replace CifsExiting with TID_EXITING.
Right, this was clearly missed by the below commit, as every other
instance of tidStatus was changed to status plus the value from
enum tid_status_enum, except this one.
> Fixes: 7e5c8c02911b ("smb3: cleanup and clarify status of tree connections")
> Signed-off-by: Tom Rix <trix@redhat.com>
Thanks for sending the patch!
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> fs/cifs/cifsfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index 0789bf1496c74..a47fa44b6d52b 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -706,7 +706,7 @@ static void cifs_umount_begin(struct super_block *sb)
> spin_unlock(&cifs_tcp_ses_lock);
> return;
> } else if (tcon->tc_count == 1)
> - tcon->status = CifsExiting;
> + tcon->status = TID_EXITING;
> spin_unlock(&cifs_tcp_ses_lock);
>
> /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */
> --
> 2.26.3
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-28 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-28 13:03 [PATCH] cifs: fix enum usage trix
2022-03-28 16:07 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox