Re: [PATCH] xfs_repair: fix incorrect return value in namecheck()

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

 



On Thu, Jan 31, 2019 at 02:20:58PM -0600, Eric Sandeen wrote:
> Obviously a directory entry with a '/' in the name should return
> 1, i.e. failure.  This was just a dumb thinko.
> 
> Fixes: 45571fd5885d ("xfs_repair: allow '/' in attribute names")
> 
> Reported-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---

Makes sense.
Reviewed-by: Bill O'Donnell <billodo@xxxxxxxxxx>
> 
> diff --git a/repair/da_util.c b/repair/da_util.c
> index c5e690c..4a258e5 100644
> --- a/repair/da_util.c
> +++ b/repair/da_util.c
> @@ -31,7 +31,7 @@ namecheck(
>  
>  	for (c = name, i = 0; i < length; i++, c++) {
>  		if (isadir && *c == '/')
> -			return 0;
> +			return 1;
>  		if (*c == '\0')
>  			return 1;
>  	}
> 



[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