summaryrefslogtreecommitdiff
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-03-28 18:48:33 +0300
committerDavid Teigland <teigland@redhat.com>2024-04-01 21:31:12 +0300
commitad191e0eeebf64a60ca2d16ca01a223d2b1dd25e (patch)
treeb7c967baae9edceeb693fc064cec42ef87896b7e /fs/dlm/dlm_internal.h
parent39cd87c4eb2b893354f3b850f916353f2658ae6f (diff)
downloadlinux-ad191e0eeebf64a60ca2d16ca01a223d2b1dd25e.tar.xz
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>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 3b4dbce849f0..a9137c90f348 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -222,6 +222,7 @@ struct dlm_callback {
int sb_status; /* copy to lksb status */
uint8_t sb_flags; /* copy to lksb flags */
int8_t mode; /* rq mode of bast, gr mode of cast */
+ int copy_lvb;
struct list_head list;
struct kref ref;