]> git.hungrycats.org Git - linux/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:08 +0000 (09:49 +0200)
commitbbd8ac533d1004c26c069e923ac76a8eb6acab45
treedcf504027d620901b5f3bfbfa194ec222140e6cc
parent8bd3fd06ac5b8ffef8900e071709ec91d3a4312a
dlm: fix user space lock decision to copy lvb

[ Upstream commit ad191e0eeebf64a60ca2d16ca01a223d2b1dd25e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/dlm/ast.c
fs/dlm/dlm_internal.h
fs/dlm/user.c