public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Dave Chinner <david@fromorbit.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
	Brian Foster <bfoster@redhat.com>,
	linux-kernel@vger.kernel.org, xfs@oss.sgi.com,
	Dave Chinner <dchinner@redhat.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled
Date: Tue, 03 Nov 2015 14:43:58 +0100	[thread overview]
Message-ID: <4425824.kIWhRaBxBZ@wuerfel> (raw)

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;
 }

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2015-11-03 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 13:43 Arnd Bergmann [this message]
2015-11-03 15:54 ` [PATCH] xfs: only modify ACLs if CONFIG_XFS_POSIX_ACL enabled Andreas Grünbacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4425824.kIWhRaBxBZ@wuerfel \
    --to=arnd@arndb.de \
    --cc=agruenba@redhat.com \
    --cc=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=dchinner@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox