Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1261505 > unrolled thread

[PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled

Started byArnd Bergmann <arnd@arndb.de>
First post2015-11-03 14:50 +0100
Last post2015-11-03 17:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled Arnd Bergmann <arnd@arndb.de> - 2015-11-03 14:50 +0100
    Re: [PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled Andreas Grünbacher <andreas.gruenbacher@gmail.com> - 2015-11-03 17:00 +0100

#1261505 — [PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled

FromArnd Bergmann <arnd@arndb.de>
Date2015-11-03 14:50 +0100
Subject[PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled
Message-ID<qqK8j-3mL-9@gated-at.bofh.it>
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 <arnd@arndb.de>
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;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1261647

FromAndreas Grünbacher <andreas.gruenbacher@gmail.com>
Date2015-11-03 17:00 +0100
Message-ID<qqMa6-4KZ-1@gated-at.bofh.it>
In reply to#1261505
Hi Arnd,

2015-11-03 14:43 GMT+01:00 Arnd Bergmann <arnd@arndb.de>:
> 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 [...]

didn't expect anybody to trip over this anytime soon...

I've sent a fix yesterday,

  http://oss.sgi.com/archives/xfs/2015-11/msg00028.html

and Dave has already fixed it in for-next:

  git//git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git

Thanks,
Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web