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

Signed-off-by: Lu Fengqi <[email protected]>
---
 btrfs-list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-list.c b/btrfs-list.c
index 6f2d8774..4ea8edfd 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1279,7 +1279,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 {
-- 
2.14.2



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to