aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2009-02-04 09:18:33 -0500
committerChris Mason <chris.mason@oracle.com>2009-02-04 09:18:33 -0500
commit811449496b3e3caa9a8cf43feacbade0153324f2 (patch)
treeb5d5afe2d629b3cf19f27d19445ad9998c6c3b1a /fs/btrfs
parent8c087b5183adab186a298f2d6ed39aefdcae413c (diff)
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 312b9435e9f8..a9d3bf4d2689 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -98,7 +98,7 @@ int __btrfs_setxattr(struct inode *inode, const char *name,
98 if (!path) 98 if (!path)
99 return -ENOMEM; 99 return -ENOMEM;
100 100
101 trans = btrfs_start_transaction(root, 1); 101 trans = btrfs_join_transaction(root, 1);
102 btrfs_set_trans_block_group(trans, inode); 102 btrfs_set_trans_block_group(trans, inode);
103 103
104 /* first lets see if we already have this xattr */ 104 /* first lets see if we already have this xattr */