From: Li Zefan Date: Wed, 8 Jun 2011 03:56:44 +0000 (+0000) Subject: Btrfs: use join_transaction in btrfs_evict_inode() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30b4caf5d73af5c99cf1b2b46496d8bc35330992;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Li Zefan Reviewed-by: Josef Bacik Signed-off-by: Chris Mason --- 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) 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;