Skip to content

Commit 3cf63dd

Browse files
fdmananakdave
authored andcommitted
btrfs: remove pointless empty log context list check when syncing log
When syncing the log, if we get an error when updating the log root, we check first if the log root tree context is in a log context list, and if so it deletes from the log root tree context from the list. This check however is pointless because at this moment the context is always in a list, he have just added it to a context list. The check became pointless after commit a93e016 ("btrfs: remove no longer needed use of log_writers for the log root tree"). So remove this now pointless empty list check. Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 68539bd commit 3cf63dd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/btrfs/tree-log.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,9 +2996,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
29962996
*/
29972997
ret = update_log_root(trans, log, &new_root_item);
29982998
if (ret) {
2999-
if (!list_empty(&root_log_ctx.list))
3000-
list_del_init(&root_log_ctx.list);
3001-
2999+
list_del_init(&root_log_ctx.list);
30023000
blk_finish_plug(&plug);
30033001
btrfs_set_log_full_commit(trans);
30043002
if (ret != -ENOSPC)

0 commit comments

Comments
 (0)