Re: [PATCH v7 12/17] xfs: avoid redundant checks when options is empty

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

 



On Thu, Oct 24, 2019 at 03:51:38PM +0800, Ian Kent wrote:
> When options passed to xfs_parseargs() is NULL the checks performed
> after taking the branch are made with the initial values of dsunit,
> dswidth and iosizelog. But all the checks do nothing in this case
> so return immediately instead.
> 
> Signed-off-by: Ian Kent <raven@xxxxxxxxxx>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/xfs_super.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 003ec725d4b6..92a37ac0b907 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -211,7 +211,7 @@ xfs_parseargs(
>  	mp->m_logbsize = -1;
>  
>  	if (!options)
> -		goto done;
> +		return 0;
>  
>  	while ((p = strsep(&options, ",")) != NULL) {
>  		int		token;
> @@ -390,7 +390,6 @@ xfs_parseargs(
>  		return -EINVAL;
>  	}
>  
> -done:
>  	if (dsunit && !(mp->m_flags & XFS_MOUNT_NOALIGN)) {
>  		/*
>  		 * At this point the superblock has not been read
> 



[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