We lookup the uuid of arbitrary subvolumes, hold a ref on the root while
we're doing this.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
ret = 1;
goto out;
}
+ if (!btrfs_grab_fs_root(subvol_root)) {
+ ret = 1;
+ goto out;
+ }
switch (type) {
case BTRFS_UUID_KEY_SUBVOL:
ret = 1;
break;
}
-
+ btrfs_put_fs_root(subvol_root);
out:
return ret;
}