summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-07-21 16:32:06 +0200
committerArnd Bergmann <arnd@arndb.de>2011-07-21 16:32:06 +0200
commit5ddac6bc1c4bfcbf645d18668a5033ca257a8ea7 (patch)
treea8a74ef15a3622ecc3ab94a424321de8b111648b /fs/btrfs/inode.c
parentc33d4326b60a3aea5cd070a365043f488f81a3b0 (diff)
parent89e1c3d0fffa0d610fa7292bbfafb5e87dc6be34 (diff)
Merge branch 'next-samsung-board' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/board
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d340f63d8f0..3601f0aebdd 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2678,12 +2678,14 @@ noinline int btrfs_update_inode(struct btrfs_trans_handle *trans,
int ret;
/*
- * If root is tree root, it means this inode is used to
- * store free space information. And these inodes are updated
- * when committing the transaction, so they needn't delaye to
- * be updated, or deadlock will occured.
+ * If the inode is a free space inode, we can deadlock during commit
+ * if we put it into the delayed code.
+ *
+ * The data relocation inode should also be directly updated
+ * without delay
*/
- if (!is_free_space_inode(root, inode)) {
+ if (!is_free_space_inode(root, inode)
+ && root->root_key.objectid != BTRFS_DATA_RELOC_TREE_OBJECTID) {
ret = btrfs_delayed_update_inode(trans, root, inode);
if (!ret)
btrfs_set_inode_last_trans(trans, inode);