aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-08-28 06:21:15 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:07 -0400
commiteab922ec8907b8c506e799785e7e2d16eabe50e4 (patch)
treed983401313631d24240524d40c9ef1d19ed4e5ac
parent639cb58675ce9b507eed9c3d6b3335488079b21a (diff)
Btrfs: compile when posix acl's are disabled
This patch makes btrfs so it will compile properly when acls are disabled. I tested this and it worked with CONFIG_FS_POSIX_ACL off and on. Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/Makefile3
-rw-r--r--fs/btrfs/acl.c21
2 files changed, 22 insertions, 2 deletions
diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
index 8213bba1de9f..3a01065d4ef1 100644
--- a/fs/btrfs/Makefile
+++ b/fs/btrfs/Makefile
@@ -7,9 +7,8 @@ btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
7 transaction.o bit-radix.o inode.o file.o tree-defrag.o \ 7 transaction.o bit-radix.o inode.o file.o tree-defrag.o \
8 extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \ 8 extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \
9 extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \ 9 extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \
10 ref-cache.o export.o 10 ref-cache.o acl.o export.o
11 11
12btrfs-$(CONFIG_FS_POSIX_ACL) += acl.o
13else 12else
14 13
15# Normal Makefile 14# Normal Makefile
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index b192659b4f5f..b95147ef1c77 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -27,6 +27,8 @@
27#include "btrfs_inode.h" 27#include "btrfs_inode.h"
28#include "xattr.h" 28#include "xattr.h"
29 29
30#ifdef CONFIG_FS_POSIX_ACL
31
30static void btrfs_update_cached_acl(struct inode *inode, 32static void btrfs_update_cached_acl(struct inode *inode,
31 struct posix_acl **p_acl, 33 struct posix_acl **p_acl,
32 struct posix_acl *acl) 34 struct posix_acl *acl)
@@ -329,3 +331,22 @@ struct xattr_handler btrfs_xattr_acl_access_handler = {
329 .get = btrfs_xattr_acl_access_get, 331 .get = btrfs_xattr_acl_access_get,
330 .set = btrfs_xattr_acl_access_set, 332 .set = btrfs_xattr_acl_access_set,
331}; 333};
334
335#else /* CONFIG_FS_POSIX_ACL */
336
337int btrfs_acl_chmod(struct inode *inode)
338{
339 return 0;
340}
341
342int btrfs_init_acl(struct inode *inode, struct inode *dir)
343{
344 return 0;
345}
346
347int btrfs_check_acl(struct inode *inode, int mask)
348{
349 return 0;
350}
351
352#endif /* CONFIG_FS_POSIX_ACL */