Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1633749rwb; Mon, 7 Nov 2022 04:07:44 -0800 (PST) X-Google-Smtp-Source: AMsMyM7AhBc7vb3XCzoAV1xEvyQl9yp0us+EfYfheVHcTMwyKvQ/3SY8e1xuYQ98Tzgs0eiGWC9q X-Received: by 2002:a05:6402:344:b0:461:7d4:9c9 with SMTP id r4-20020a056402034400b0046107d409c9mr51037584edw.141.1667822864522; Mon, 07 Nov 2022 04:07:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667822864; cv=none; d=google.com; s=arc-20160816; b=vLIdU9X/o5rG7oKuwoHglihV8JkHS+5oseN1QTD5vj5I8zGUbEWiRBtDcfQy6p9EP6 u2k7v7zUjqvOAJh+EGQpvHv9q1P5/SMammdQF2NGvj9olxDF0jz1r5qBo5pxsNs0AsV9 IQrSf7ZBzlorxG5H9gwedwzlLUUgXlTUf8+XsLMsWnhZyvs1FXfauLUGkeyKvjbzxpSz f/Cjcikp491Lb9DOJ0xHdlCfesED7XVw0swS1F0tawE1yrIIAafC2ERwJDzqutNzUOeM XFg5Go29hDUcSK+xRsCP/ub3Vz01mopn8UmpcDPZ2qY0Q5le0KIy7k6Hh843Z2sDAZxQ jiXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ENgaIYKZkuJ4VyFVwYXEuuBpPWe99cx0AlKMBdJXVxc=; b=mlDJGolJBsG0FeqdWS5ueuXQrX+T+uy5BRYuF4EuG867OcWCsSCmpdLr+OsSLt5yQO IQ1MMgw07KmjfAm6x+hnJ7uNTOt2H/OoGyL4iGEl1MGd1YqRUyAhpekqpT1yXhCWdyId VpUP0SGkKGYRw99qCOOMjqbwx/vUtzebYL7W0GuBbj95MzadgErYojIdEsuODgEuNeeb QwxzCO4QVKHeD9xeQkrIcVYWLnIaWeUuqE9FmWNpYzMGVtwDAfF/2KZUQvnRm8cw7H48 K1OOxk87h72lru6LOAb7uxVGjxT3kgtSzjXpdN/uAs0klO7tnGT+2C1MT92+ltygb8U/ 2ESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o33P5lWt; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020aa7c14c000000b00456d901922bsi7377487edp.510.2022.11.07.04.07.05; Mon, 07 Nov 2022 04:07:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o33P5lWt; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230438AbiKGL6x (ORCPT + 99 others); Mon, 7 Nov 2022 06:58:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230434AbiKGL6p (ORCPT ); Mon, 7 Nov 2022 06:58:45 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C95CA1ADB0 for ; Mon, 7 Nov 2022 03:58:44 -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 1414260FF8 for ; Mon, 7 Nov 2022 11:58:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF424C433C1; Mon, 7 Nov 2022 11:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667822323; bh=0Io8a4DUlk1r8Hbz4lpDkEn6BQuIG7hR++/IpDnBxmo=; h=From:To:Cc:Subject:Date:From; b=o33P5lWtXtFfl30xmkLN3nJVOgI3EKILZyKAEIzR63ZyBKxG9QwiDlBcdVOZb2m0b r37u9PhiDVnofF6AIMzV8s4Sq3l8zu/uRDIdGCi8yGTHQic3FxpP99JXV9cJ2KalFd W7VMtImhBJjSXhbOCG+Obb6ETSK0lv444X1HFcwnoT8MHg4nW8x4NdYsCklX81cxyD rgwycyS9dq/TGN0QL8+aAyThn9SzQqOUW2M+uw+f2Ok/bD6spjMXRDgTkf4GJFISTc xS6PFO6/YMCt4HireSzg2PvgW30T2OSpnOaQn+X9DSQvnZGkI65qu2ucxTjN5RbxQV eS8X+gFluNbaQ== From: Jeff Layton To: chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org, Neil Brown , Yongcheng Yang Subject: [PATCH] nfsd: return error if nfs4_setacl fails Date: Mon, 7 Nov 2022 06:58:41 -0500 Message-Id: <20221107115841.26380-1-jlayton@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 --- 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