Return-Path: Received: from out01.mta.xmission.com ([166.70.13.231]:59845 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbeBZXy0 (ORCPT ); Mon, 26 Feb 2018 18:54:26 -0500 From: "Eric W. Biederman" To: Miklos Szeredi Cc: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, Alban Crequy , Seth Forshee , Sargun Dhillon , Dongsu Park , "Serge E. Hallyn" , "Eric W. Biederman" Date: Mon, 26 Feb 2018 17:52:59 -0600 Message-Id: <20180226235302.12708-4-ebiederm@xmission.com> In-Reply-To: <87po4rz4ui.fsf_-_@xmission.com> References: <87po4rz4ui.fsf_-_@xmission.com> Subject: [PATCH v7 4/7] fuse: Cache a NULL acl when FUSE_GETXATTR returns -ENOSYS Sender: linux-fsdevel-owner@vger.kernel.org List-ID: When FUSE_GETXATTR will never return anything call cache_no_acl to cache that state in the vfs as well in fuse with fc->no_getxattr. The only code path this affects are the code paths that call fuse_get_acl and caching a NULL or returning it immediately is exactly the same effect so this should not effect anything. This keeps the vfs from waisting it's time calling down into fuse when fuse isn't going to do anything, and it makes it clear when a NULL should be cached for optimal performance. Signed-off-by: "Eric W. Biederman" --- fs/fuse/xattr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c index 3caac46b08b0..0520a4f47226 100644 --- a/fs/fuse/xattr.c +++ b/fs/fuse/xattr.c @@ -82,6 +82,7 @@ ssize_t fuse_getxattr(struct inode *inode, const char *name, void *value, ret = min_t(ssize_t, outarg.size, XATTR_SIZE_MAX); if (ret == -ENOSYS) { fc->no_getxattr = 1; + cache_no_acl(inode); ret = -EOPNOTSUPP; } return ret; -- 2.14.1