--- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3225,6 +3225,7 @@ int btrfs_sync_log(struct btrfs_trans_ha ret = btrfs_alloc_log_tree_node(trans, log_root_tree); if (ret) { mutex_unlock(&fs_info->tree_root->log_mutex); + blk_finish_plug(&plug); goto out; } }