mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 13:23:18 +00:00
btrfs: remove list_empty() check at warn_about_uncommitted_trans()
At warn_about_uncommitted_trans(), there's no need to check if the list is empty and return, because list_for_each_entry_safe() is safe to call for an empty list, it simply does nothing. So remove the check. Reviewed-by: Qu Wenruo <wqu@suse.com> 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
47f6944877
commit
606a1c5de1
@ -4182,9 +4182,6 @@ static void warn_about_uncommitted_trans(struct btrfs_fs_info *fs_info)
|
||||
struct btrfs_transaction *tmp;
|
||||
bool found = false;
|
||||
|
||||
if (list_empty(&fs_info->trans_list))
|
||||
return;
|
||||
|
||||
/*
|
||||
* This function is only called at the very end of close_ctree(),
|
||||
* thus no other running transaction, no need to take trans_lock.
|
||||
|
Loading…
Reference in New Issue
Block a user