diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-06-07 23:56:44 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-06-11 08:31:55 -0400 |
commit | 30b4caf5d73af5c99cf1b2b46496d8bc35330992 (patch) | |
tree | 009c4e72049ec03e6e7254b8b8c15e5af7c7e1ad | |
parent | 22b63a2971c5657dfc1bf4514f9410fc90c8b2c2 (diff) |
Btrfs: use join_transaction in btrfs_evict_inode()
The WARN_ON() in start_transaction() was triggered while balancing.
The cause is btrfs_relocate_chunk() started a transaction and
then called iput() on the inode that stores free space cache,
and iput() called btrfs_start_transaction() again.
Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Reviewed-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 113913ae36e0..c15636b17874 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -3646,7 +3646,7 @@ void btrfs_evict_inode(struct inode *inode) | |||
3646 | btrfs_i_size_write(inode, 0); | 3646 | btrfs_i_size_write(inode, 0); |
3647 | 3647 | ||
3648 | while (1) { | 3648 | while (1) { |
3649 | trans = btrfs_start_transaction(root, 0); | 3649 | trans = btrfs_join_transaction(root); |
3650 | BUG_ON(IS_ERR(trans)); | 3650 | BUG_ON(IS_ERR(trans)); |
3651 | trans->block_rsv = root->orphan_block_rsv; | 3651 | trans->block_rsv = root->orphan_block_rsv; |
3652 | 3652 | ||