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 a93e01682e28 ("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 <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
68539bd0e7
commit
3cf63ddf29
@ -2996,9 +2996,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
|
|||||||
*/
|
*/
|
||||||
ret = update_log_root(trans, log, &new_root_item);
|
ret = update_log_root(trans, log, &new_root_item);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (!list_empty(&root_log_ctx.list))
|
list_del_init(&root_log_ctx.list);
|
||||||
list_del_init(&root_log_ctx.list);
|
|
||||||
|
|
||||||
blk_finish_plug(&plug);
|
blk_finish_plug(&plug);
|
||||||
btrfs_set_log_full_commit(trans);
|
btrfs_set_log_full_commit(trans);
|
||||||
if (ret != -ENOSPC)
|
if (ret != -ENOSPC)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user