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 <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
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,