Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
- index af6246f36a9e..b3fd7b3af2b8 100644
- --- a/fs/btrfs/xattr.c
- +++ b/fs/btrfs/xattr.c
- @@ -231,7 +231,13 @@ int btrfs_setxattr_trans(struct inode *inode, const char *name,
- struct btrfs_trans_handle *trans;
- int ret;
- - trans = btrfs_start_transaction(root, 2);
- + if (current->journal_info) {
- + WARN_ON(strncmp(name, XATTR_SECURITY_PREFIX,
- + XATTR_SECURITY_PREFIX_LEN) != 0);
- + trans = btrfs_join_transaction(root);
- + } else {
- + trans = btrfs_start_transaction(root, 2);
- + }
- if (IS_ERR(trans))
- return PTR_ERR(trans);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement