Re: [PATCH 17/23] libxfs: remove dead size < 0 checks in libxfs_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 11, 2023 at 05:37:36PM +0100, Christoph Hellwig wrote:
> 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@xxxxxx>

Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>

> ---
>  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.39.2
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux