diff options
author | Yan <yanzheng@21cn.com> | 2008-01-14 13:26:08 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:59 -0400 |
commit | 744f52f997b21de2a01931f79cf6c198bf688120 (patch) | |
tree | 903f0d91560b139bc7167f424e34664ddb7c0b72 /fs/btrfs/dir-item.c | |
parent | b3a0d8d28c607cb2531a68742afc2b967b1f6083 (diff) | |
download | linux-744f52f997b21de2a01931f79cf6c198bf688120.tar.gz linux-744f52f997b21de2a01931f79cf6c198bf688120.tar.bz2 linux-744f52f997b21de2a01931f79cf6c198bf688120.zip |
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.c | 3 |
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, |