]> git.hungrycats.org Git - linux/commitdiff
Btrfs: remove BUG_ON in start_transaction
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 14 Sep 2016 02:15:48 +0000 (19:15 -0700)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sat, 24 Sep 2016 04:14:12 +0000 (00:14 -0400)
Since we could get errors from the concurrent aborted transaction,
the check of this BUG_ON in start_transaction is not true any more.

Say, while flushing free space cache inode's dirty pages,
btrfs_finish_ordered_io
 -> btrfs_join_transaction_nolock
      (the transaction has been aborted.)
      -> BUG_ON(type == TRANS_JOIN_NOLOCK);

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit 78c2a8dcd723840f0ef6e3b429e846b25e33391d)

fs/btrfs/transaction.c

index b6031ce474f7c06f90c764c0bf520a95480ef561..1e847efda7885acc8b6a6787ad65a0b1b26c7b87 100644 (file)
@@ -548,11 +548,8 @@ again:
                }
        } while (ret == -EBUSY);
 
-       if (ret < 0) {
-               /* We must get the transaction if we are JOIN_NOLOCK. */
-               BUG_ON(type == TRANS_JOIN_NOLOCK);
+       if (ret < 0)
                goto join_fail;
-       }
 
        cur_trans = root->fs_info->running_transaction;