* [PATCH] NFSD: Fix oversight in .pc_func conversion
@ 2020-10-10 19:43 Chuck Lever
2020-10-12 14:28 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Lever @ 2020-10-10 19:43 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs
nfsd_proc_setattr() needs to return an accept_stat value, not an
nfserr status code, when fh_verify() fails.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfsd/nfsproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Oops.
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index f2450c719032..0d71549f9d42 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -85,7 +85,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp)
resp->status = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP);
if (resp->status != nfs_ok)
- return resp->status;
+ goto out;
if (delta < 0)
delta = -delta;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFSD: Fix oversight in .pc_func conversion
2020-10-10 19:43 [PATCH] NFSD: Fix oversight in .pc_func conversion Chuck Lever
@ 2020-10-12 14:28 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2020-10-12 14:28 UTC (permalink / raw)
To: Chuck Lever; +Cc: linux-nfs
On Sat, Oct 10, 2020 at 03:43:15PM -0400, Chuck Lever wrote:
> nfsd_proc_setattr() needs to return an accept_stat value, not an
> nfserr status code, when fh_verify() fails.
Thanks! I'll fold that into "NFSD: Hoist status code encoding into XDR
encoder functions".
--b.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> fs/nfsd/nfsproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Oops.
>
> diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
> index f2450c719032..0d71549f9d42 100644
> --- a/fs/nfsd/nfsproc.c
> +++ b/fs/nfsd/nfsproc.c
> @@ -85,7 +85,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp)
>
> resp->status = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP);
> if (resp->status != nfs_ok)
> - return resp->status;
> + goto out;
>
> if (delta < 0)
> delta = -delta;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-12 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10 19:43 [PATCH] NFSD: Fix oversight in .pc_func conversion Chuck Lever
2020-10-12 14:28 ` J. Bruce Fields
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.