public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsd: delete unnecessary NULL check in __fh_verify()
@ 2025-09-04 18:59 Dan Carpenter
  2025-09-04 19:26 ` Scott Mayhew
  2025-09-05 14:26 ` Chuck Lever
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-09-04 18:59 UTC (permalink / raw)
  To: Scott Mayhew
  Cc: Chuck Lever, Jeff Layton, NeilBrown, Olga Kornievskaia, Dai Ngo,
	Tom Talpey, linux-nfs, linux-kernel, kernel-janitors

In commit 4a0de50a44bb ("nfsd: decouple the xprtsec policy check from
check_nfsd_access()") we added a NULL check on "rqstp" to earlier in
the function.  This check is no longer required so delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 fs/nfsd/nfsfh.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 062cfc18d8c6..3edccc38db42 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -403,9 +403,7 @@ __fh_verify(struct svc_rqst *rqstp,
 	if (error)
 		goto out;
 
-	/* During LOCALIO call to fh_verify will be called with a NULL rqstp */
-	if (rqstp)
-		svc_xprt_set_valid(rqstp->rq_xprt);
+	svc_xprt_set_valid(rqstp->rq_xprt);
 
 check_permissions:
 	/* Finally, check access permissions. */
-- 
2.47.2


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

* Re: [PATCH] nfsd: delete unnecessary NULL check in __fh_verify()
  2025-09-04 18:59 [PATCH] nfsd: delete unnecessary NULL check in __fh_verify() Dan Carpenter
@ 2025-09-04 19:26 ` Scott Mayhew
  2025-09-05 14:26 ` Chuck Lever
  1 sibling, 0 replies; 3+ messages in thread
From: Scott Mayhew @ 2025-09-04 19:26 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Chuck Lever, Jeff Layton, NeilBrown, Olga Kornievskaia, Dai Ngo,
	Tom Talpey, linux-nfs, linux-kernel, kernel-janitors

On Thu, 04 Sep 2025, Dan Carpenter wrote:

> In commit 4a0de50a44bb ("nfsd: decouple the xprtsec policy check from
> check_nfsd_access()") we added a NULL check on "rqstp" to earlier in
> the function.  This check is no longer required so delete it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Scott Mayhew <smayhew@redhat.com>

-Scott
> ---
>  fs/nfsd/nfsfh.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
> index 062cfc18d8c6..3edccc38db42 100644
> --- a/fs/nfsd/nfsfh.c
> +++ b/fs/nfsd/nfsfh.c
> @@ -403,9 +403,7 @@ __fh_verify(struct svc_rqst *rqstp,
>  	if (error)
>  		goto out;
>  
> -	/* During LOCALIO call to fh_verify will be called with a NULL rqstp */
> -	if (rqstp)
> -		svc_xprt_set_valid(rqstp->rq_xprt);
> +	svc_xprt_set_valid(rqstp->rq_xprt);
>  
>  check_permissions:
>  	/* Finally, check access permissions. */
> -- 
> 2.47.2
> 


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

* Re: [PATCH] nfsd: delete unnecessary NULL check in __fh_verify()
  2025-09-04 18:59 [PATCH] nfsd: delete unnecessary NULL check in __fh_verify() Dan Carpenter
  2025-09-04 19:26 ` Scott Mayhew
@ 2025-09-05 14:26 ` Chuck Lever
  1 sibling, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2025-09-05 14:26 UTC (permalink / raw)
  To: Scott Mayhew, Dan Carpenter
  Cc: Chuck Lever, Jeff Layton, NeilBrown, Olga Kornievskaia, Dai Ngo,
	Tom Talpey, linux-nfs, linux-kernel, kernel-janitors

From: Chuck Lever <chuck.lever@oracle.com>

On Thu, 04 Sep 2025 21:59:30 +0300, Dan Carpenter wrote:
> In commit 4a0de50a44bb ("nfsd: decouple the xprtsec policy check from
> check_nfsd_access()") we added a NULL check on "rqstp" to earlier in
> the function.  This check is no longer required so delete it.
> 
> 

Applied to nfsd-testing, thanks!

[1/1] nfsd: delete unnecessary NULL check in __fh_verify()
      commit: ec3d9745c6a3f41658d17873e4890b56cc27f9c8

--
Chuck Lever


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

end of thread, other threads:[~2025-09-05 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 18:59 [PATCH] nfsd: delete unnecessary NULL check in __fh_verify() Dan Carpenter
2025-09-04 19:26 ` Scott Mayhew
2025-09-05 14:26 ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox