Btrfs: compile when posix acl's are disabled
authorJosef Bacik <jbacik@redhat.com>
Thu, 28 Aug 2008 10:21:15 +0000 (06:21 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:07 +0000 (11:04 -0400)
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>
fs/btrfs/Makefile
fs/btrfs/acl.c

index 8213bba..3a01065 100644 (file)
@@ -7,9 +7,8 @@ btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
           transaction.o bit-radix.o inode.o file.o tree-defrag.o \
           extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \
           extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \
-          ref-cache.o export.o
+          ref-cache.o acl.o export.o
 
-btrfs-$(CONFIG_FS_POSIX_ACL)   += acl.o
 else
 
 # Normal Makefile
index b192659..b95147e 100644 (file)
@@ -27,6 +27,8 @@
 #include "btrfs_inode.h"
 #include "xattr.h"
 
+#ifdef CONFIG_FS_POSIX_ACL
+
 static void btrfs_update_cached_acl(struct inode *inode,
                                    struct posix_acl **p_acl,
                                    struct posix_acl *acl)
@@ -329,3 +331,22 @@ struct xattr_handler btrfs_xattr_acl_access_handler = {
        .get    = btrfs_xattr_acl_access_get,
        .set    = btrfs_xattr_acl_access_set,
 };
+
+#else /* CONFIG_FS_POSIX_ACL */
+
+int btrfs_acl_chmod(struct inode *inode)
+{
+       return 0;
+}
+
+int btrfs_init_acl(struct inode *inode, struct inode *dir)
+{
+       return 0;
+}
+
+int btrfs_check_acl(struct inode *inode, int mask)
+{
+       return 0;
+}
+
+#endif /* CONFIG_FS_POSIX_ACL */