btrfs-progs: remove BUG_ON on num of devices for btrfs fi show
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>
Fri, 7 Nov 2014 02:07:42 +0000 (10:07 +0800)
committerDavid Sterba <dsterba@suse.cz>
Thu, 4 Dec 2014 15:48:13 +0000 (16:48 +0100)
The following BUG_ON:
BUG_ON(ndevs >= fi_args->num_devices)
is not needed, because it always fails with seed devices present.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
utils.c

diff --git a/utils.c b/utils.c
index 3fd8092..16b10e0 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -1906,7 +1906,6 @@ int get_fs_info(char *path, struct btrfs_ioctl_fs_info_args *fi_args,
        }
 
        for (; i <= fi_args->max_id; ++i) {
-               BUG_ON(ndevs >= fi_args->num_devices);
                ret = get_device_info(fd, i, &di_args[ndevs]);
                if (ret == -ENODEV)
                        continue;