Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns
[firefly-linux-kernel-4.4.55.git] / fs / btrfs / tree-log.c
index 0e044d7ee721ec1708def2298fa47f6a359764d6..1415f6d5863342ea35fcaf125b6484a121861b77 100644 (file)
@@ -2850,6 +2850,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
 
        if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) {
                blk_finish_plug(&plug);
+               list_del_init(&root_log_ctx.list);
                mutex_unlock(&log_root_tree->log_mutex);
                ret = root_log_ctx.log_ret;
                goto out;