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 C0B3FC32771 for ; Sat, 24 Sep 2022 18:13:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229893AbiIXSN5 (ORCPT ); Sat, 24 Sep 2022 14:13:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbiIXSNz (ORCPT ); Sat, 24 Sep 2022 14:13:55 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E14DF6AE9D for ; Sat, 24 Sep 2022 11:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JCjOC+kJyI3LoFk1HZucLeLgATg1WlshxOETKBbIdAU=; b=XviR4iWx60orBCR2ELvAaXZ7AM XiUodkRXKNvjaZmZpU1eTPEG0673m6uUO9JXV6zivLmgPJPex1Zixn4rV/S5Qjwn/CXS/sWTItCOq 4yS6CR/cWFM7z2/NsEnlImYbZ7ATjSWsBwAS7M9U0s+HHnoKZBn9u/ovcgpIde9i11ysFOrkwHzlB RuO2vlmeiuwUABNlR3hauHR5mywxSzpmkySZYoRAE/ZhnyAUjeQo+oV2AT7wtpE7hF/rjnRtRvnRV g1XeMGVMbxT4T4SaLoMsEjLnw9VmmYPMawGW4p5JvfNRaynFJtvR4IC72Q1usQ7k16DC8p3xSWpMu 8CUz6ApQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1oc9ey-003OpL-2Q; Sat, 24 Sep 2022 18:13:52 +0000 Date: Sat, 24 Sep 2022 19:13:52 +0100 From: Al Viro To: Christian Brauner Cc: linux-fsdevel@vger.kernel.org, Seth Forshee , Christoph Hellwig , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , v9fs-developer@lists.sourceforge.net Subject: Re: [PATCH 06/29] 9p: implement get acl method Message-ID: References: <20220922151728.1557914-1-brauner@kernel.org> <20220922151728.1557914-7-brauner@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220922151728.1557914-7-brauner@kernel.org> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Sep 22, 2022 at 05:17:04PM +0200, Christian Brauner wrote: > + struct v9fs_session_info *v9ses; > + struct posix_acl *acl = NULL; > + > + v9ses = v9fs_dentry2v9ses(dentry); > + /* We allow set/get/list of acl when access=client is not specified. */ > + if ((v9ses->flags & V9FS_ACCESS_MASK) != V9FS_ACCESS_CLIENT) > + acl = v9fs_acl_get(dentry, posix_acl_xattr_name(type)); > + else > + acl = v9fs_get_cached_acl(d_inode(dentry), type); > + if (IS_ERR(acl)) > + return acl; > + > + return acl; *blink* 1. Set acl to NULL, just in case. 2. Set acl to either one expression or another 3. If acl is an ERR_PTR(something), return acl 4. buggrit, return acl anyway.