Skip to contentSkip to conversation

Patch "Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Sep 22, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns

to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
btrfs-remove-root_log_ctx-from-ctx-list-before-btrfs_sync_log-returns.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From cbd60aa7cd17d81a434234268c55192862147439 Mon Sep 17 00:00:00 2001

From: Chris Mason <[email protected]>
Date: Tue, 6 Sep 2016 05:37:40 -0700
Subject: Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns

From: Chris Mason <[email protected]>

commit cbd60aa7cd17d81a434234268c55192862147439 upstream.

We use a btrfs_log_ctx structure to pass information into the tree log commit, and get error values out. It gets added to a per log-transaction list which we walk when things go bad.

Commit d1433debe added an optimization to skip waiting for the log commit, but didn't take root_log_ctx out of the list. This patch makes sure we remove things before exiting.

Fixes d1433debe7f4346cf9fc0dafc71c3137d2a97bc4
---
 fs/btrfs/tree-log.c |    1 +
 1 file changed, 1 insertion(+)
fs/btrfs/tree-log.c +1 -0
@@ -2851,6 +2851,7 @@ int btrfs_sync_log(struct btrfs_trans_ha
 
 	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;

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/btrfs-remove-root_log_ctx-from-ctx-list-before-btrfs_sync_log-returns.patch