diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-04-03 12:38:21 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-05-07 21:31:03 +0200 |
commit | 606a1c5de13e8cb017dfcf485c1a5c3565b1d2a5 (patch) | |
tree | 20282f59b1521dd9843e86f9d54e7af367102644 /fs/btrfs | |
parent | 47f694487738af319d0e0fae26c61d77fd6d0c5e (diff) |
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5a35c2c0bbc9..0474e9b6d302 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -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. |