From patchwork Tue Nov 3 13:43:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7542491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E990BF90C for ; Tue, 3 Nov 2015 13:46:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A618206AF for ; Tue, 3 Nov 2015 13:46:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DD0E2066B for ; Tue, 3 Nov 2015 13:46:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtbtB-0005eQ-CE; Tue, 03 Nov 2015 13:44:41 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ztbt1-0005bJ-Md for linux-arm-kernel@lists.infradead.org; Tue, 03 Nov 2015 13:44:32 +0000 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0Lsw94-1aZqOY2wXK-012b8o; Tue, 03 Nov 2015 14:44:00 +0100 From: Arnd Bergmann To: Dave Chinner Subject: [PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled Date: Tue, 03 Nov 2015 14:43:58 +0100 Message-ID: <4425824.kIWhRaBxBZ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:IKzBcwP+e4iHMXkRDYjfgGZy7Wb2b2rhVV+Nlg4+C3mqxsbmf4d VPZ7lZ+ow3OFUhHf+KvzdBSqdQfFWgOIHRiROQANfFbhDfvehZObEXKjEZxGe9oC1M3mf+Z /I2gkwGNgoHQiozxyEJMVsaTv1JdN4seA9hr696HRovjGMJoP1n3iby/ys7rNEzwfkkMlg5 yZxOV/tMIEcksBVKUmwhw== X-UI-Out-Filterresults: notjunk:1; V01:K0:tR4k5bxNivo=:eeXM01pztZedAqYJJBiRwB HK8mmPhX9QdPR8RjKeQTsHJktvUPP44ehD7eoqTNDYYIGvXc3+qpnfsmjzN0OWafwqkMviXFw v0d3bKDaH6GBkZtDzW5V0tTX8b0w4qRAuLEcmzJf8z7BEk9kFPNGX9VIBo5m3L6P6j/sFKlLN 2pKK+9T3eKjpZXP5pe4dAUlocx0YBxdrvvgZRXEtypyuQsbDMSnGj70Y498fgkNzl0zee20VL u5hwB5NYkT9dHL+kxOteXw7efsnoZbBA3kyavTr18jp7AdNMjoZedJubiti6GfmFXRzBKZWzS tZkSHiBxNVeixfobttTmyP5U8rRlQp3o497RBdggSSY7Ga2kifJmLhPYTNyBIGHSynLIETmM7 kEAhvyW1xXu5C28URylNJ7jusnlz1mguOT0M27pNxtQC4ok0TB3MV90BqCfM5M7X1RJHbYKRl MhcNLE69Z7/hkdG24uUgqJNFrEX/szxBGr/ruB61AuiCEYUZVY70b7alvZi1gGZdXqRklC35/ Gurr6a83Uyv9ZbLAaZuvYdCTa01ZshwIbhidOaQ6gTJDZGLz+Bvch2gv7rzP75aXc8zHKcKUH gbeQYYxpjgmdSZ6RLhAOfnJYkrj6y+UPRlj4yRY2MWUywsjbYTipqMVq7jozkyYTMNbInUW9Z 0gnc99E2qz3HJ0ApCGXBwWe0f1Jab6beXBn0QbEVG+dfsHInikWR5efWiuF7oZ3YWwUYH51AG 0Jrp9TI2qb70GF3P X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151103_054432_105259_55FC16E2 X-CRM114-Status: GOOD ( 14.21 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andreas Gruenbacher , Brian Foster , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, Dave Chinner , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A recent bug fix added a call to forget_cached_acl(), but that function is not always available, so we can get a build error here: fs/xfs/xfs_xattr.c: In function 'xfs_xattr_set': fs/xfs/xfs_xattr.c:84:4: error: implicit declaration of function 'forget_cached_acl' [-Werror=implicit-function-declaration] This changes the code to use the same #ifdef that we already use to encapsule the existing ACL handling. Signed-off-by: Arnd Bergmann Fixes: 6caa105651cb ("xfs: invalidate cached acl if set directly via xattr") --- This started breaking ARM davinci_all_defconfig today in linux-next diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c index 2e1eb80d5374..6229325abdd3 100644 --- a/fs/xfs/xfs_xattr.c +++ b/fs/xfs/xfs_xattr.c @@ -73,6 +73,7 @@ xfs_xattr_set(struct dentry *dentry, const char *name, const void *value, return xfs_attr_remove(ip, (unsigned char *)name, xflags); error = xfs_attr_set(ip, (unsigned char *)name, (void *)value, size, xflags); +#ifdef CONFIG_XFS_POSIX_ACL /* * Invalidate any cached ACLs if the user has bypassed the ACL * interface. We don't validate the content whatsoever so it is caller @@ -85,6 +86,7 @@ xfs_xattr_set(struct dentry *dentry, const char *name, const void *value, else if (!strncmp(name, SGI_ACL_DEFAULT, strlen(name))) forget_cached_acl(VFS_I(ip), ACL_TYPE_DEFAULT); } +#endif return error; }