Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] nfsd: return error if nfs4_setacl fails
@ 2022-11-07 11:58 Jeff Layton
  2022-11-07 14:21 ` Chuck Lever III
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2022-11-07 11:58 UTC (permalink / raw)
  To: chuck.lever; +Cc: linux-nfs, Neil Brown, Yongcheng Yang

With the addition of POSIX ACLs to struct nfsd_attrs, we no longer
return an error if setting the ACL fails. Ensure we return the na_aclerr
error on SETATTR if there is one.

Fixes: c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")
Cc: Neil Brown <neilb@suse.de>
Reported-by: Yongcheng Yang <yoyang@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfsd/nfs4proc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 6f7e0c5e62d2..a6173677b766 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1135,6 +1135,8 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
 				0, (time64_t)0);
 	if (!status)
 		status = nfserrno(attrs.na_labelerr);
+	if (!status)
+		status = nfserrno(attrs.na_aclerr);
 out:
 	nfsd_attrs_free(&attrs);
 	fh_drop_write(&cstate->current_fh);
-- 
2.38.1


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

* Re: [PATCH] nfsd: return error if nfs4_setacl fails
  2022-11-07 11:58 [PATCH] nfsd: return error if nfs4_setacl fails Jeff Layton
@ 2022-11-07 14:21 ` Chuck Lever III
  0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever III @ 2022-11-07 14:21 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Linux NFS Mailing List, Neil Brown, Yongcheng Yang



> On Nov 7, 2022, at 6:58 AM, Jeff Layton <jlayton@kernel.org> wrote:
> 
> With the addition of POSIX ACLs to struct nfsd_attrs, we no longer
> return an error if setting the ACL fails. Ensure we return the na_aclerr
> error on SETATTR if there is one.
> 
> Fixes: c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")
> Cc: Neil Brown <neilb@suse.de>
> Reported-by: Yongcheng Yang <yoyang@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>

Applied to nfsd's for-next tree (6.2). Thanks!


> ---
> fs/nfsd/nfs4proc.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 6f7e0c5e62d2..a6173677b766 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -1135,6 +1135,8 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> 				0, (time64_t)0);
> 	if (!status)
> 		status = nfserrno(attrs.na_labelerr);
> +	if (!status)
> +		status = nfserrno(attrs.na_aclerr);
> out:
> 	nfsd_attrs_free(&attrs);
> 	fh_drop_write(&cstate->current_fh);
> -- 
> 2.38.1
> 

--
Chuck Lever




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

end of thread, other threads:[~2022-11-07 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-07 11:58 [PATCH] nfsd: return error if nfs4_setacl fails Jeff Layton
2022-11-07 14:21 ` Chuck Lever III

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