diff options
author | Lu Fengqi <lufq.fnst@cn.fujitsu.com> | 2017-10-13 17:17:22 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-10-13 20:16:03 +0200 |
commit | 19b18536d117c3e000fb9fa913081b5985127070 (patch) | |
tree | b26b8624c9c88cd5cc4311b3868eba892d06931f | |
parent | 0792c170282f4b94bb2ffce483a5294d56eb8036 (diff) |
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>
-rw-r--r-- | btrfs-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs-list.c b/btrfs-list.c index dd917a31..b6d76585 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -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 { |