提交 9ca55299 编写于 作者: D Daniel Walter 提交者: Richard Weinberger

um: Do not unlock mutex that is not hold.

Return error instead of trying to unlock a mutex that is not hold.
Signed-off-by: NDaniel Walter <dwalter@google.com>
Reviewed-by: NAnton Ivanov <anton.ivanov@cambridgegreys.com>
Acked-by: NAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 91e1e547
......@@ -276,14 +276,14 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
str++;
if(!strcmp(str, "sync")){
global_openflags = of_sync(global_openflags);
goto out1;
return err;
}
err = -EINVAL;
major = simple_strtoul(str, &end, 0);
if((*end != '\0') || (end == str)){
*error_out = "Didn't parse major number";
goto out1;
return err;
}
mutex_lock(&ubd_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册