search for: __btrfs_setxattr

Displaying 6 results from an estimated 6 matches for "__btrfs_setxattr".

2011 May 16
0
[PATCH v5 12/21] evm: add evm_inode_post_init call in btrfs
...e = kmalloc(XATTR_SECURITY_PREFIX_LEN + strlen(suffix) + 1, + name = kmalloc(XATTR_SECURITY_PREFIX_LEN + strlen(lsm_xattr.name) + 1, GFP_NOFS); if (!name) { err = -ENOMEM; } else { strcpy(name, XATTR_SECURITY_PREFIX); - strcpy(name + XATTR_SECURITY_PREFIX_LEN, suffix); - err = __btrfs_setxattr(trans, inode, name, value, len, 0); + strcpy(name + XATTR_SECURITY_PREFIX_LEN, lsm_xattr.name); + err = __btrfs_setxattr(trans, inode, name, lsm_xattr.value, + lsm_xattr.value_len, 0); kfree(name); } + if (err) + goto out; + + err = evm_inode_post_init_security(inode, &lsm_xat...
2011 Jun 02
0
[PATCH v6 11/20] evm: add evm_inode_post_init call in btrfs
...e = kmalloc(XATTR_SECURITY_PREFIX_LEN + strlen(suffix) + 1, + name = kmalloc(XATTR_SECURITY_PREFIX_LEN + strlen(lsm_xattr.name) + 1, GFP_NOFS); if (!name) { err = -ENOMEM; } else { strcpy(name, XATTR_SECURITY_PREFIX); - strcpy(name + XATTR_SECURITY_PREFIX_LEN, suffix); - err = __btrfs_setxattr(trans, inode, name, value, len, 0); + strcpy(name + XATTR_SECURITY_PREFIX_LEN, lsm_xattr.name); + err = __btrfs_setxattr(trans, inode, name, lsm_xattr.value, + lsm_xattr.value_len, 0); kfree(name); } + if (err) + goto out; + + err = evm_inode_post_init_security(inode, &lsm_xat...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + btrfs_abort_transaction(root, ret); goto done; } diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c index 5366fe4..048d4cd 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c @@ -155,8 +155,10 @@ int __btrfs_setxattr(struct btrfs_trans_handle *trans, return do_setxattr(trans, inode, name, value, size, flags); trans = btrfs_start_transaction(root, 2); - if (IS_ERR(trans)) + if (IS_ERR(trans)) { + btrfs_abort_transaction(root, PTR_ERR(trans)); return PTR_ERR(trans); + } ret = do_setxattr(trans, ino...
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent buffer while we look for readahead targets. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/ctree.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...trfs_trans_handle *trans, /* ok we have to create a completely new xattr */ ret = btrfs_insert_xattr_item(trans, root, path, inode->i_ino, name, name_len, value, size); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); out: btrfs_free_path(path); return ret; @@ -166,7 +166,7 @@ int __btrfs_setxattr(struct btrfs_trans_handle *trans, inode->i_ctime = CURRENT_TIME; ret = btrfs_update_inode(trans, root, inode); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); out: btrfs_end_transaction_throttle(trans, root); return ret; -- 1.6.4.2 -- To unsubscribe from this list: send the line "u...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
An user reported that he has hit an annoying deadlock while playing with ceph based on btrfs. Current updating device tree requires space from METADATA chunk, so we -may- need to do a recursive chunk allocation when adding/updating dev extent, that is where the deadlock comes from. If we use SYSTEM metadata to update device tree, we can avoid the recursive stuff. Reported-by: Jim Schutt