Btrfs: join the transaction in __btrfs_setxattr

With selinux on we end up calling __btrfs_setxattr when we create an inode,
which calls btrfs_start_transaction(). The problem is we've already called
that in btrfs_new_inode, and in btrfs_start_transaction we end up doing a
wait_current_trans(). If btrfs-transaction has started committing it will wait
for all handles to finish, while the other process is waiting for the
transaction to commit. This is fixed by using btrfs_join_transaction, which
won't wait for the transaction to commit. Thanks,

Signed-off-by: Josef Bacik <jbacik@redhat.com>


authored by Josef Bacik and committed by Chris Mason 81144949 8c087b51

+1 -1
+1 -1
fs/btrfs/xattr.c
··· 98 98 if (!path) 99 99 return -ENOMEM; 100 100 101 - trans = btrfs_start_transaction(root, 1); 101 + trans = btrfs_join_transaction(root, 1); 102 102 btrfs_set_trans_block_group(trans, inode); 103 103 104 104 /* first lets see if we already have this xattr */