linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guoqing Jiang <gqjiang@suse.com>
To: Zhilong Liu <zlliu@suse.com>, shli@fb.com
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] md.c:didn't unlock the mddev before return EINVAL in array_size_store
Date: Mon, 10 Apr 2017 15:23:55 +0800	[thread overview]
Message-ID: <58EB330B.9070309@suse.com> (raw)
In-Reply-To: <1491804955-7548-1-git-send-email-zlliu@suse.com>


On 04/10/2017 02:15 PM, Zhilong Liu wrote:
> md.c: it needs to release the mddev lock before
> the array_size_store() returns.

Fixes: ab5a98b132fd ("md-cluster: change array_sectors and update size 
are not supported")

>
> Signed-off-by: Zhilong Liu <zlliu@suse.com>
> ---
>   drivers/md/md.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index f6ae1d6..5327236 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -4843,8 +4843,10 @@ array_size_store(struct mddev *mddev, const char *buf, size_t len)
>   		return err;
>   
>   	/* cluster raid doesn't support change array_sectors */
> -	if (mddev_is_clustered(mddev))
> +	if (mddev_is_clustered(mddev)) {
> +		mddev_unlock(mddev);
>   		return -EINVAL;
> +	}

Reviewed-by: Guoqing Jiang <gqjiang@suse.com>

Thanks,
Guoqing

  reply	other threads:[~2017-04-10  7:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  6:15 [PATCH] md.c:didn't unlock the mddev before return EINVAL in array_size_store Zhilong Liu
2017-04-10  7:23 ` Guoqing Jiang [this message]
2017-04-10 17:49 ` Shaohua Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58EB330B.9070309@suse.com \
    --to=gqjiang@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@fb.com \
    --cc=zlliu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).