From: Alexander Aring Date: Mon, 15 Aug 2022 19:43:20 +0000 (-0400) Subject: fs: dlm: allow lockspaces have zero lvblen X-Git-Tag: v6.1-rc1~190^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5c9d37c7f6051b45b2da70e434e791080dcb53f;p=thirdparty%2Flinux.git fs: dlm: allow lockspaces have zero lvblen A dlm user may not use the DLM_LKF_VALBLK flag in the DLM API, so a zero lvblen should be allowed as a lockspace parameter. Signed-off-by: Alexander Aring Signed-off-by: David Teigland --- diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index 3972f4d86c755..56c79926e7be7 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -416,7 +416,7 @@ static int new_lockspace(const char *name, const char *cluster, if (namelen > DLM_LOCKSPACE_LEN || namelen == 0) return -EINVAL; - if (!lvblen || (lvblen % 8)) + if (lvblen % 8) return -EINVAL; if (!try_module_get(THIS_MODULE))