* [PATCH] Fix disabled XFS POSIX ACL handling
@ 2008-06-27 12:43 David Howells
2008-06-27 16:11 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2008-06-27 12:43 UTC (permalink / raw)
To: hch, tes, lachlan; +Cc: xfs-masters, xfs, dhowells
Fix XFS POSIX ACL handling when it's not enabled. xfs_decode_acl() refers to
return types that aren't defined under those circumstances.
Signed-off-by: David Howells <dhowells@redhat.com>
---
fs/xfs/linux-2.6/xfs_xattr.c | 14 --------------
fs/xfs/xfs_acl.c | 13 +++++++++++++
fs/xfs/xfs_acl.h | 2 ++
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/fs/xfs/linux-2.6/xfs_xattr.c b/fs/xfs/linux-2.6/xfs_xattr.c
index b4acb68..fe93f41 100644
--- a/fs/xfs/linux-2.6/xfs_xattr.c
+++ b/fs/xfs/linux-2.6/xfs_xattr.c
@@ -30,20 +30,6 @@
/*
- * ACL handling. Should eventually be moved into xfs_acl.c
- */
-
-static int
-xfs_decode_acl(const char *name)
-{
- if (strcmp(name, "posix_acl_access") == 0)
- return _ACL_TYPE_ACCESS;
- else if (strcmp(name, "posix_acl_default") == 0)
- return _ACL_TYPE_DEFAULT;
- return -EINVAL;
-}
-
-/*
* Get system extended attributes which at the moment only
* includes Posix ACLs.
*/
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 93057af..24bcbf5 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -51,6 +51,19 @@ kmem_zone_t *xfs_acl_zone;
/*
+ * ACL handling.
+ */
+int
+xfs_decode_acl(const char *name)
+{
+ if (strcmp(name, "posix_acl_access") == 0)
+ return _ACL_TYPE_ACCESS;
+ else if (strcmp(name, "posix_acl_default") == 0)
+ return _ACL_TYPE_DEFAULT;
+ return -EINVAL;
+}
+
+/*
* Test for existence of access ACL attribute as efficiently as possible.
*/
int
diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h
index 332a772..7bf8ef5 100644
--- a/fs/xfs/xfs_acl.h
+++ b/fs/xfs/xfs_acl.h
@@ -57,6 +57,7 @@ extern struct kmem_zone *xfs_acl_zone;
(zone) = kmem_zone_init(sizeof(xfs_acl_t), (name))
#define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone)
+extern int xfs_decode_acl(const char *);
extern int xfs_acl_inherit(bhv_vnode_t *, mode_t mode, xfs_acl_t *);
extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *);
extern int xfs_acl_vtoacl(bhv_vnode_t *, xfs_acl_t *, xfs_acl_t *);
@@ -80,6 +81,7 @@ extern int xfs_acl_vremove(bhv_vnode_t *, int);
#define _ACL_FREE(a) ((a)? kmem_zone_free(xfs_acl_zone, (a)):(void)0)
#else
+#define xfs_decode_acl(name) (-EINVAL)
#define xfs_acl_zone_init(zone,name)
#define xfs_acl_zone_destroy(zone)
#define xfs_acl_vset(v,p,sz,t) (-EOPNOTSUPP)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix disabled XFS POSIX ACL handling
2008-06-27 12:43 [PATCH] Fix disabled XFS POSIX ACL handling David Howells
@ 2008-06-27 16:11 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2008-06-27 16:11 UTC (permalink / raw)
To: David Howells; +Cc: hch, tes, lachlan, xfs-masters, xfs
On Fri, Jun 27, 2008 at 01:43:54PM +0100, David Howells wrote:
> Fix XFS POSIX ACL handling when it's not enabled. xfs_decode_acl() refers to
> return types that aren't defined under those circumstances.
The XFS tree already has a slightly different fix which should be in the
next Linux-next tree.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-27 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27 12:43 [PATCH] Fix disabled XFS POSIX ACL handling David Howells
2008-06-27 16:11 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox