btrfs: avoid superfluous check in foreach_snapshot_of_subvol() helper

The helper iterates with the BTRFS_SNAPSHOT_REGEX regular expression,
so there will always be a snapshot name.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner
2025-02-20 16:11:27 +01:00
parent a25b1050ce
commit 424280a16c

View File

@ -417,7 +417,6 @@ my sub foreach_snapshot_of_subvol : prototype($$) {
my ($volume, $name, $snap_name) = ($1, $2, $3);
return if !path_is_subvolume("$dir/$volume");
return if $name ne $basename;
return if !defined $snap_name;
$code->($snap_name);
});
}