]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dlm: cleanup plock_op vs plock_xop
authorAlexander Aring <aahringo@redhat.com>
Mon, 4 Apr 2022 20:06:32 +0000 (16:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:28 +0000 (10:22 +0200)
commit75ce95abc65b341345b6c78de295df06802fdb3d
tree682de3f1d4ca3e727759b064d17ba26741915ab3
parentb409d8df9bea6d870b187046a30676ecb88d0662
dlm: cleanup plock_op vs plock_xop

[ Upstream commit bcbb4ba6c9ba81e6975b642a2cade68044cd8a66 ]

Lately the different casting between plock_op and plock_xop and list
holders which was involved showed some issues which were hard to see.
This patch removes the "plock_xop" structure and introduces a
"struct plock_async_data". This structure will be set in "struct plock_op"
in case of asynchronous lock handling as the original "plock_xop" was
made for. There is no need anymore to cast pointers around for
additional fields in case of asynchronous lock handling.  As disadvantage
another allocation was introduces but only needed in the asynchronous
case which is currently only used in combination with nfs lockd.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Stable-dep-of: 59e45c758ca1 ("fs: dlm: interrupt posix locks only when process is killed")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/dlm/plock.c