btrfs-progs: subvol list: don't print deleted subvol as TOPLEVEL

We should use entry->root_id instead of top_id to determine whether it is
the toplevel subvolume. Introduced in 4.13.2.

Issue: #72
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Lu Fengqi 2017-10-13 17:17:22 +08:00 committed by David Sterba
parent 0792c17028
commit 19b18536d1

View File

@ -1273,7 +1273,7 @@ static void filter_and_sort_subvol(struct root_lookup *all_subvols,
ret = resolve_root(all_subvols, entry, top_id);
if (ret == -ENOENT) {
if (top_id != BTRFS_FS_TREE_OBJECTID) {
if (entry->root_id != BTRFS_FS_TREE_OBJECTID) {
entry->full_path = strdup("DELETED");
entry->deleted = 1;
} else {