lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <wrfjy42b94uu.fsf@redhat.com>
Date:   Wed, 28 Sep 2016 15:55:21 -0400
From:   Jes Sorensen <Jes.Sorensen@...hat.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     linux-raid@...r.kernel.org, Shaohua Li <shli@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH 08/16] md/bitmap: Rename a jump label in location_store()

SF Markus Elfring <elfring@...rs.sourceforge.net> writes:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 27 Sep 2016 15:46:22 +0200
>
> Adjust jump labels according to the current Linux coding style convention.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  drivers/md/bitmap.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)

Sorry but this patch is just plain ridiculous. It does not improve the
code in any shape or form.

'out' as a label is perfectly legitimate and just as good as 'unlock'.

Jes

> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index 41d99fd..22fa09a 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -2187,11 +2187,11 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
>  	if (mddev->pers) {
>  		if (!mddev->pers->quiesce) {
>  			rv = -EBUSY;
> -			goto out;
> +			goto unlock;
>  		}
>  		if (mddev->recovery || mddev->sync_thread) {
>  			rv = -EBUSY;
> -			goto out;
> +			goto unlock;
>  		}
>  	}
>  
> @@ -2200,7 +2200,7 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
>  		/* bitmap already configured.  Only option is to clear it */
>  		if (strncmp(buf, "none", 4) != 0) {
>  			rv = -EBUSY;
> -			goto out;
> +			goto unlock;
>  		}
>  		if (mddev->pers) {
>  			mddev->pers->quiesce(mddev, 1);
> @@ -2221,23 +2221,23 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
>  		else if (strncmp(buf, "file:", 5) == 0) {
>  			/* Not supported yet */
>  			rv = -EINVAL;
> -			goto out;
> +			goto unlock;
>  		} else {
>  			if (buf[0] == '+')
>  				rv = kstrtoll(buf+1, 10, &offset);
>  			else
>  				rv = kstrtoll(buf, 10, &offset);
>  			if (rv)
> -				goto out;
> +				goto unlock;
>  			if (offset == 0) {
>  				rv = -EINVAL;
> -				goto out;
> +				goto unlock;
>  			}
>  			if (mddev->bitmap_info.external == 0 &&
>  			    mddev->major_version == 0 &&
>  			    offset != mddev->bitmap_info.default_offset) {
>  				rv = -EINVAL;
> -				goto out;
> +				goto unlock;
>  			}
>  			mddev->bitmap_info.offset = offset;
>  			if (mddev->pers) {
> @@ -2255,7 +2255,7 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
>  				mddev->pers->quiesce(mddev, 0);
>  				if (rv) {
>  					bitmap_destroy(mddev);
> -					goto out;
> +					goto unlock;
>  				}
>  			}
>  		}
> @@ -2268,7 +2268,7 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
>  		md_wakeup_thread(mddev->thread);
>  	}
>  	rv = 0;
> -out:
> +unlock:
>  	mddev_unlock(mddev);
>  	if (rv)
>  		return rv;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ