From f735961188fce99ac70a605bd7f5046accb5da2b Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 11 Dec 2023 17:37:36 +0100 Subject: [PATCH] libxfs: remove dead size < 0 checks in libxfs_init libxfs_init initializes the device size to 0 at the start of the function and libxfs_open_device never sets the size to a negativ value. Remove these checks as they are dead code. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino --- libxfs/init.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/libxfs/init.c b/libxfs/init.c index 5be6f8cf1..87193c3a6 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -329,21 +329,6 @@ libxfs_init(struct libxfs_init *a) platform_findsizes(dname, a->rtfd, &a->rtsize, &a->rtbsize); } - if (a->dsize < 0) { - fprintf(stderr, _("%s: can't get size for data subvolume\n"), - progname); - goto done; - } - if (a->logBBsize < 0) { - fprintf(stderr, _("%s: can't get size for log subvolume\n"), - progname); - goto done; - } - if (a->rtsize < 0) { - fprintf(stderr, _("%s: can't get size for realtime subvolume\n"), - progname); - goto done; - } if (!libxfs_bhash_size) libxfs_bhash_size = LIBXFS_BHASHSIZE(sbp); libxfs_bcache = cache_init(a->bcache_flags, libxfs_bhash_size, -- 2.47.2