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>
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c
index ddbe12a..5247a9a 100644
--- a/fs/btrfs/dir-item.c
+++ b/fs/btrfs/dir-item.c
@@ -76,6 +76,9 @@
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,