From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72A5AC3DA7A for ; Wed, 28 Dec 2022 15:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233052AbiL1PQc (ORCPT ); Wed, 28 Dec 2022 10:16:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233134AbiL1PQc (ORCPT ); Wed, 28 Dec 2022 10:16:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 884B23A2 for ; Wed, 28 Dec 2022 07:16:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 27CD0614BA for ; Wed, 28 Dec 2022 15:16:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C8FCC433F1; Wed, 28 Dec 2022 15:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672240590; bh=ZOFxuwlQiRYgKhrX6MeJJgLFOdLm9A8VsApIXOSl6uw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K72SSgDqjUrZ+YOXP52NYDX0+E+vEbbN1MNs+Nn6kZGnHV5aFqP/hKfxj2sIQqnMZ f9OSRKYiyVoU7sdiA56TxV25kadkJb+vlbR5BXHBAovrQIM0zBRaF1V70CKqMRppBm IqaS6a06QOVcdPNKq8LZBn51JzXcwp15R4y3E93M= 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.0 0178/1073] nfsd: return error if nfs4_setacl fails Date: Wed, 28 Dec 2022 15:29:26 +0100 Message-Id: <20221228144332.844403978@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144328.162723588@linuxfoundation.org> References: <20221228144328.162723588@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 6ba25a5b76e1..b71a3c2d9409 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1141,6 +1141,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