* [PATCH] md.c:didn't unlock the mddev before return EINVAL in array_size_store
@ 2017-04-10 6:15 Zhilong Liu
2017-04-10 7:23 ` Guoqing Jiang
2017-04-10 17:49 ` Shaohua Li
0 siblings, 2 replies; 3+ messages in thread
From: Zhilong Liu @ 2017-04-10 6:15 UTC (permalink / raw)
To: shli; +Cc: linux-raid, Zhilong Liu
md.c: it needs to release the mddev lock before
the array_size_store() returns.
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;
+ }
if (strncmp(buf, "default", 7) == 0) {
if (mddev->pers)
--
2.6.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] md.c:didn't unlock the mddev before return EINVAL in array_size_store
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
2017-04-10 17:49 ` Shaohua Li
1 sibling, 0 replies; 3+ messages in thread
From: Guoqing Jiang @ 2017-04-10 7:23 UTC (permalink / raw)
To: Zhilong Liu, shli; +Cc: linux-raid
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] md.c:didn't unlock the mddev before return EINVAL in array_size_store
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
@ 2017-04-10 17:49 ` Shaohua Li
1 sibling, 0 replies; 3+ messages in thread
From: Shaohua Li @ 2017-04-10 17:49 UTC (permalink / raw)
To: Zhilong Liu; +Cc: shli, linux-raid
On Mon, Apr 10, 2017 at 02:15:55PM +0800, Zhilong Liu wrote:
> md.c: it needs to release the mddev lock before
> the array_size_store() returns.
applied, thanks!
> 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;
> + }
>
> if (strncmp(buf, "default", 7) == 0) {
> if (mddev->pers)
> --
> 2.6.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-10 17:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2017-04-10 17:49 ` Shaohua Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.