Btrfs: use join_transaction in btrfs_evict_inode()
PATCH 1/1 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 <[email protected]>
Signed-off-by Li Zefan <[email protected]>
--- fs/btrfs/inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/btrfs/inode.c +1 -1
@@ -3646,7 +3646,7 @@ void btrfs_evict_inode(struct inode *inode)btrfs_i_size_write (inode,0 );while (1 ) { - trans =btrfs_start_transaction (root,0 ); + trans =btrfs_join_transaction (root);BUG_ON (IS_ERR (trans)); trans->block_rsv = root->orphan_block_rsv;
-- 1.7.3.1
Quoted 8 lines · Li Zefan
The
WARN_ON()instart_transaction()was triggered while balancing.The cause is
btrfs_relocate_chunk()started a transaction and then callediput()on the inode that stores free space cache, andiput()calledbtrfs_start_transaction()again.Reported-by Tsutomu Itoh <[email protected]>Signed-off-by Li Zefan <[email protected]>
Reviewed-by Josef Bacik <[email protected]>
Thanks,
Josef