From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6C4B1863 for ; Wed, 28 Dec 2022 15:21:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66BCAC433D2; Wed, 28 Dec 2022 15:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672240916; bh=qEW4P3ShBw/O+nZDvlRl8XZKAB8zq7fIQbrLg6RyqFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rl1PXrd+Gg3j2dTKUc9IQLFpsJtygWTFFmNJLxZtUv4sKHrE0aUlvBXNs6VHKpt0P CfUIerTWFAjJNlssEjMDVW/sAYkK6TYsfxX9bEnyVzI3kSa2n39DcYr0PqKX/szKxD tNvtLHVA9qUdLcNrVFPwyVzlZDlZ7wQckBeUJSfA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Neil Brown , Yongcheng Yang , Jeff Layton , Chuck Lever , Sasha Levin Subject: [PATCH 6.1 0184/1146] nfsd: return error if nfs4_setacl fails Date: Wed, 28 Dec 2022 15:28:43 +0100 Message-Id: <20221228144335.149523183@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144330.180012208@linuxfoundation.org> References: <20221228144330.180012208@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Jeff Layton [ Upstream commit 01d53a88c08951f88f2a42f1f1e6568928e0590e ] 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 Reported-by: Yongcheng Yang Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever Signed-off-by: Sasha Levin --- fs/nfsd/nfs4proc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 8beb2bc4c328..e91d0918592c 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1133,6 +1133,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.35.1