dlm: fix user space lock decision to copy lvb
authorAlexander Aring <aahringo@redhat.com>
Thu, 28 Mar 2024 15:48:33 +0000 (11:48 -0400)
committerDavid Teigland <teigland@redhat.com>
Mon, 1 Apr 2024 18:31:12 +0000 (13:31 -0500)
commitad191e0eeebf64a60ca2d16ca01a223d2b1dd25e
treeb7c967baae9edceeb693fc064cec42ef87896b7e
parent39cd87c4eb2b893354f3b850f916353f2658ae6f
dlm: fix user space lock decision to copy lvb

This patch fixes the copy lvb decision for user space lock requests.
Checking dlm_lvb_operations is done earlier, where granted/requested
lock modes are available to use in the matrix.

The decision had been moved to the wrong location, where granted mode
and requested mode where the same, which causes the dlm_lvb_operations
matix to produce the wrong copy decision. For PW or EX requests, the
caller could get invalid lvb data.

Fixes: 61bed0baa4db ("fs: dlm: use a non-static queue for callbacks")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/ast.c
fs/dlm/dlm_internal.h
fs/dlm/user.c