]> git.hungrycats.org Git - linux/commitdiff
Revert "Btrfs: don't ignore log btree writeback errors"
authorZygo Blaxell <zblaxell@thirteen.furryterror.org>
Wed, 26 Aug 2015 01:18:59 +0000 (21:18 -0400)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Fri, 28 Aug 2015 04:11:37 +0000 (00:11 -0400)
This reverts commit e89abcfabf775603cb2eae86a79748313f6e5f73.

(cherry picked from commit 2e5a1d87fd3600cb0daebec2f542ae765df03ed2)

fs/btrfs/tree-log.c

index 5591ee43551a19f44952077673bad7107b48edbb..90ddcd7ff1336e3b735cd3785f874422147e154b 100644 (file)
@@ -2756,14 +2756,12 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
        index2 = root_log_ctx.log_transid % 2;
        if (atomic_read(&log_root_tree->log_commit[index2])) {
                blk_finish_plug(&plug);
-               ret = btrfs_wait_marked_extents(log, &log->dirty_log_pages,
-                                               mark);
+               btrfs_wait_marked_extents(log, &log->dirty_log_pages, mark);
                btrfs_wait_logged_extents(trans, log, log_transid);
                wait_log_commit(trans, log_root_tree,
                                root_log_ctx.log_transid);
                mutex_unlock(&log_root_tree->log_mutex);
-               if (!ret)
-                       ret = root_log_ctx.log_ret;
+               ret = root_log_ctx.log_ret;
                goto out;
        }
        ASSERT(root_log_ctx.log_transid == log_root_tree->log_transid);
@@ -2800,17 +2798,10 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
                mutex_unlock(&log_root_tree->log_mutex);
                goto out_wake_log_root;
        }
-       ret = btrfs_wait_marked_extents(log, &log->dirty_log_pages, mark);
-       if (!ret)
-               ret = btrfs_wait_marked_extents(log_root_tree,
-                                               &log_root_tree->dirty_log_pages,
-                                               EXTENT_NEW | EXTENT_DIRTY);
-       if (ret) {
-               btrfs_set_log_full_commit(root->fs_info, trans);
-               btrfs_free_logged_extents(log, log_transid);
-               mutex_unlock(&log_root_tree->log_mutex);
-               goto out_wake_log_root;
-       }
+       btrfs_wait_marked_extents(log, &log->dirty_log_pages, mark);
+       btrfs_wait_marked_extents(log_root_tree,
+                                 &log_root_tree->dirty_log_pages,
+                                 EXTENT_NEW | EXTENT_DIRTY);
        btrfs_wait_logged_extents(trans, log, log_transid);
 
        btrfs_set_super_log_root(root->fs_info->super_for_commit,