fs: dlm: allow lockspaces have zero lvblen
authorAlexander Aring <aahringo@redhat.com>
Mon, 15 Aug 2022 19:43:20 +0000 (15:43 -0400)
committerDavid Teigland <teigland@redhat.com>
Tue, 23 Aug 2022 19:53:16 +0000 (14:53 -0500)
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 <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lockspace.c

index 3972f4d86c7551c6739fefa8573f956a279cb110..56c79926e7be7142e56d560b38388bdf97ace473 100644 (file)
@@ -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))