Btrfs: make btrfs_abort_transaction consider existence of new block groups
[linux-drm-fsl-dcu.git] / fs / btrfs / super.c
index 391ec4418460046f80042f40ba98d41b0a7c4ab8..60f7cbe815e9c88362a1680f8e4259f51ca6f019 100644 (file)
@@ -262,7 +262,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
        trans->aborted = errno;
        /* Nothing used. The other threads that have joined this
         * transaction may be able to continue. */
-       if (!trans->blocks_used) {
+       if (!trans->blocks_used && list_empty(&trans->new_bgs)) {
                const char *errstr;
 
                errstr = btrfs_decode_error(errno);