From d729048be6ef072bf2de76442e059af00bd1db8a Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 23 Nov 2022 17:37:21 -0500 Subject: [PATCH] btrfs-progs: stop using btrfs_root_item_v0 This isn't defined in the kernel, we simply check if the root item size is less than btrfs_root_item, so adjust the user of btrfs_root_item_v0 to make a similar check. Signed-off-by: Josef Bacik Signed-off-by: David Sterba --- cmds/subvolume-list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds/subvolume-list.c b/cmds/subvolume-list.c index 77aeb5df..6d5ef509 100644 --- a/cmds/subvolume-list.c +++ b/cmds/subvolume-list.c @@ -870,8 +870,8 @@ static int list_subvol_search(int fd, struct rb_root *root_lookup) ri = (struct btrfs_root_item *)(args.buf + off); gen = btrfs_root_generation(ri); flags = btrfs_root_flags(ri); - if(sh.len > - sizeof(struct btrfs_root_item_v0)) { + if(sh.len < + sizeof(struct btrfs_root_item)) { otime = btrfs_stack_timespec_sec(&ri->otime); ogen = btrfs_root_otransid(ri); memcpy(uuid, ri->uuid, BTRFS_UUID_SIZE);