From ef5c369a371e045a41f1c904f92583bf7c75e19b Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Thu, 15 Feb 2018 02:57:07 +0100 Subject: [PATCH] btrbk: use _is_same_fs_tree() where applicable --- btrbk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btrbk b/btrbk index ffedadd..cf240a7 100755 --- a/btrbk +++ b/btrbk @@ -4585,7 +4585,7 @@ MAIN: unless(vinfo_init_root($target_vol)) { ERROR "Failed to fetch subvolume detail for '$target_vol->{PRINT}'" . ($err ? ": $err" : ""); exit 1; } if($target_vol->{node}{is_root}) { ERROR "Subvolume is btrfs root: $target_vol->{PRINT}"; exit 1; } - unless(_is_child_of($src_vol->{node}->{TREE_ROOT}, $target_vol->{node}{uuid})) { + unless(_is_same_fs_tree($src_vol->{node}, $target_vol->{node})) { ERROR "Subvolumes are not on the same btrfs filesystem!"; exit 1; } @@ -4771,7 +4771,7 @@ MAIN: } } } - if(_is_child_of($droot->{node}->{TREE_ROOT}, $vol->{node}{uuid})) { + if(_is_same_fs_tree($droot->{node}, $vol->{node})) { ERROR "Source and target subvolumes are on the same btrfs filesystem!"; exit 1; }