summaryrefslogtreecommitdiff
path: root/fs/btrfs/dir-item.c
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2008-01-14 21:26:08 +0300
committerChris Mason <chris.mason@oracle.com>2008-09-25 19:03:59 +0400
commit744f52f997b21de2a01931f79cf6c198bf688120 (patch)
tree903f0d91560b139bc7167f424e34664ddb7c0b72 /fs/btrfs/dir-item.c
parentb3a0d8d28c607cb2531a68742afc2b967b1f6083 (diff)
downloadlinux-744f52f997b21de2a01931f79cf6c198bf688120.tar.xz
Btrfs: Implement ACLs setting and getting
ACLs are stored but not used for permission checks (yet) Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r--fs/btrfs/dir-item.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c
index ddbe12ae0d63..5247a9a41f08 100644
--- a/fs/btrfs/dir-item.c
+++ b/fs/btrfs/dir-item.c
@@ -76,6 +76,9 @@ int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans,
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
+ if (name_len + data_len + sizeof(struct btrfs_dir_item) >
+ BTRFS_LEAF_DATA_SIZE(root) - sizeof(struct btrfs_item))
+ return -ENOSPC;
data_size = sizeof(*dir_item) + name_len + data_len;
dir_item = insert_with_overflow(trans, root, path, &key, data_size,