mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs()
@ 2024-01-31  7:10 Dan Carpenter
  2024-01-31 17:23 ` Paulo Alcantara
  2024-01-31 20:20 ` Steve French
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2024-01-31  7:10 UTC (permalink / raw)
  To: Paulo Alcantara
  Cc: Steve French, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
	linux-cifs, samba-technical, linux-kernel, kernel-janitors

This was intended to be an IS_ERR() check.  The ea_create_context()
function doesn't return NULL.

Fixes: 1eab17fe485c ("smb: client: add support for WSL reparse points")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 fs/smb/client/reparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/smb/client/reparse.c b/fs/smb/client/reparse.c
index ce69d67feefa..d4d2555ebd38 100644
--- a/fs/smb/client/reparse.c
+++ b/fs/smb/client/reparse.c
@@ -225,7 +225,7 @@ static int wsl_set_xattrs(struct inode *inode, umode_t mode,
 	}
 
 	cc = ea_create_context(dlen, &cc_len);
-	if (!cc)
+	if (IS_ERR(cc))
 		return PTR_ERR(cc);
 
 	ea = &cc->ea;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs()
  2024-01-31  7:10 [PATCH] smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs() Dan Carpenter
@ 2024-01-31 17:23 ` Paulo Alcantara
  2024-01-31 20:20 ` Steve French
  1 sibling, 0 replies; 3+ messages in thread
From: Paulo Alcantara @ 2024-01-31 17:23 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Steve French, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
	linux-cifs, samba-technical, linux-kernel, kernel-janitors

Dan Carpenter <dan.carpenter@linaro.org> writes:

> This was intended to be an IS_ERR() check.  The ea_create_context()
> function doesn't return NULL.
>
> Fixes: 1eab17fe485c ("smb: client: add support for WSL reparse points")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  fs/smb/client/reparse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Paulo Alcantara <pc@manguebit.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs()
  2024-01-31  7:10 [PATCH] smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs() Dan Carpenter
  2024-01-31 17:23 ` Paulo Alcantara
@ 2024-01-31 20:20 ` Steve French
  1 sibling, 0 replies; 3+ messages in thread
From: Steve French @ 2024-01-31 20:20 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Paulo Alcantara, Steve French, Ronnie Sahlberg, Shyam Prasad N,
	Tom Talpey, linux-cifs, samba-technical, linux-kernel,
	kernel-janitors

Good catch.  Thx.

Added Paulo's RB and added to cifs-2.6.git for-next


On Wed, Jan 31, 2024 at 1:17 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> This was intended to be an IS_ERR() check.  The ea_create_context()
> function doesn't return NULL.
>
> Fixes: 1eab17fe485c ("smb: client: add support for WSL reparse points")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  fs/smb/client/reparse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/reparse.c b/fs/smb/client/reparse.c
> index ce69d67feefa..d4d2555ebd38 100644
> --- a/fs/smb/client/reparse.c
> +++ b/fs/smb/client/reparse.c
> @@ -225,7 +225,7 @@ static int wsl_set_xattrs(struct inode *inode, umode_t mode,
>         }
>
>         cc = ea_create_context(dlen, &cc_len);
> -       if (!cc)
> +       if (IS_ERR(cc))
>                 return PTR_ERR(cc);
>
>         ea = &cc->ea;
> --
> 2.43.0
>
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-31 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31  7:10 [PATCH] smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs() Dan Carpenter
2024-01-31 17:23 ` Paulo Alcantara
2024-01-31 20:20 ` 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®