Skip to content

Commit cc687c2

Browse files
fdmananakdave
authored andcommitted
btrfs: remove redundant log root tree index assignment during log sync
During log syncing, when we start updating the log root tree we compute an index value, stored in variable 'index2', once we lock the log root tree's mutex. This value depends on the log root's log_transid. And shortly after we compute again the same value for 'index2' - the value is exactly the same since we haven't released the mutex and therefore the log_transid of the log root is the same as before. This second 'index2' computation became pointless after commit a93e016 ("btrfs: remove no longer needed use of log_writers for the log root tree"). So remove it. Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent a666ce9 commit cc687c2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/btrfs/tree-log.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3016,7 +3016,6 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
30163016
goto out;
30173017
}
30183018

3019-
index2 = root_log_ctx.log_transid % 2;
30203019
if (atomic_read(&log_root_tree->log_commit[index2])) {
30213020
blk_finish_plug(&plug);
30223021
ret = btrfs_wait_tree_log_extents(log, mark);

0 commit comments

Comments
 (0)