linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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 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).