diff options
author | Yan <yanzheng@21cn.com> | 2008-01-14 19:26:08 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 17:03:59 +0200 |
commit | 744f52f997b21de2a01931f79cf6c198bf688120 (patch) | |
tree | 903f0d91560b139bc7167f424e34664ddb7c0b72 /fs/btrfs/dir-item.c | |
parent | Btrfs: Remove verbose WARN_ON (diff) | |
download | linux-744f52f997b21de2a01931f79cf6c198bf688120.tar.xz 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, |