summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/xattr.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-07-24 12:16:36 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:05 -0400
commit33268eaf0b3db5e2bd12c0ada81a8e8f87a46d68 (patch)
tree93b6d00a73402b59c2ea7ae7434138feecefc085 /fs/btrfs/xattr.c
parent6099afe88fe64b2f47c43a8a71c13be3a416bbf7 (diff)
downloadop-kernel-dev-33268eaf0b3db5e2bd12c0ada81a8e8f87a46d68.zip
op-kernel-dev-33268eaf0b3db5e2bd12c0ada81a8e8f87a46d68.tar.gz
Btrfs: Add ACL support
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/xattr.c')
-rw-r--r--fs/btrfs/xattr.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 6730b59..121c955 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -26,25 +26,27 @@
#include "transaction.h"
#include "xattr.h"
#include "disk-io.h"
+
static struct xattr_handler *btrfs_xattr_handler_map[] = {
[BTRFS_XATTR_INDEX_USER] = &btrfs_xattr_user_handler,
#ifdef CONFIG_FS_POSIX_ACL
-// [BTRFS_XATTR_INDEX_POSIX_ACL_ACCESS] = &btrfs_xattr_acl_access_handler,
-// [BTRFS_XATTR_INDEX_POSIX_ACL_DEFAULT] = &btrfs_xattr_acl_default_handler,
+ [BTRFS_XATTR_INDEX_POSIX_ACL_ACCESS] = &btrfs_xattr_acl_access_handler,
+ [BTRFS_XATTR_INDEX_POSIX_ACL_DEFAULT] = &btrfs_xattr_acl_default_handler,
#endif
[BTRFS_XATTR_INDEX_TRUSTED] = &btrfs_xattr_trusted_handler,
[BTRFS_XATTR_INDEX_SECURITY] = &btrfs_xattr_security_handler,
-// [BTRFS_XATTR_INDEX_SYSTEM] = &btrfs_xattr_system_handler,
+ [BTRFS_XATTR_INDEX_SYSTEM] = &btrfs_xattr_system_handler,
};
+
struct xattr_handler *btrfs_xattr_handlers[] = {
&btrfs_xattr_user_handler,
#ifdef CONFIG_FS_POSIX_ACL
-// &btrfs_xattr_acl_access_handler,
-// &btrfs_xattr_acl_default_handler,
+ &btrfs_xattr_acl_access_handler,
+ &btrfs_xattr_acl_default_handler,
#endif
&btrfs_xattr_trusted_handler,
&btrfs_xattr_security_handler,
-// &btrfs_xattr_system_handler,
+ &btrfs_xattr_system_handler,
NULL,
};
@@ -237,10 +239,14 @@ int btrfs_xattr_set(struct inode *inode, int name_index,
mod = 1;
goto out;
}
- } else if (flags & XATTR_REPLACE) {
- /* we couldn't find the attr to replace, so error out */
- ret = -ENODATA;
- goto out;
+ } else {
+ btrfs_release_path(root, path);
+
+ if (flags & XATTR_REPLACE) {
+ /* we couldn't find the attr to replace */
+ ret = -ENODATA;
+ goto out;
+ }
}
/* ok we have to create a completely new xattr */
OpenPOWER on IntegriCloud