nfsd: return error if nfs4_setacl fails
Subsystems (2)
Jeff Layton
maintainerPATCH 1/1 nfsd: return error if nfs4_setacl fails
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 <[email protected]>
Reported-by Yongcheng Yang <[email protected]>
Signed-off-by Jeff Layton <[email protected]>
--- fs/nfsd/nfs4proc.c | 2 ++ 1 file changed, 2 insertions(+)
fs/nfsd/nfs4proc.c +2 -0
@@ -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);
Signature · 1 line
2.38.1
Chuck Lever III
AppliedQuoted 12 lines · Jeff Layton
With the addition of POSIX ACLs to struct
nfsd_attrs, we no longer return an error if setting the ACL fails. Ensure we return thena_aclerrerror on SETATTR if there is one.Fixes c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")Cc Neil Brown <[email protected]>Reported-by Yongcheng Yang <[email protected]>Signed-off-by Jeff Layton <[email protected]>
Applied to nfsd's for-next tree (6.2). Thanks!
Quoted 15 lines
---
fs/nfsd/nfs4proc.c| 2 ++1 file changed, 2 insertions(+)fs/nfsd/nfs4proc.c +2
-0@@ -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:
Quoted 5 lines
nfsd_attrs_free(&attrs); fh_drop_write(&cstate->current_fh);Signature · 1 line
2.38.1
--
Chuck Lever