]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lockd: introduce safe async lock op
authorAlexander Aring <aahringo@redhat.com>
Tue, 12 Sep 2023 21:53:18 +0000 (17:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:29 +0000 (16:19 +0200)
commit2267b2e84593bd3d61a1188e68fba06307fa9dab
treea13cd79031aff909a1c341e06f6c77c34bb25f76
parent6e5fed48d8b7b25f8517a1292b62a3a86a5aec91
lockd: introduce safe async lock op

[ Upstream commit 2dd10de8e6bcbacf85ad758b904543c294820c63 ]

This patch reverts mostly commit 40595cdc93ed ("nfs: block notification
on fs with its own ->lock") and introduces an EXPORT_OP_ASYNC_LOCK
export flag to signal that the "own ->lock" implementation supports
async lock requests. The only main user is DLM that is used by GFS2 and
OCFS2 filesystem. Those implement their own lock() implementation and
return FILE_LOCK_DEFERRED as return value. Since commit 40595cdc93ed
("nfs: block notification on fs with its own ->lock") the DLM
implementation were never updated. This patch should prepare for DLM
to set the EXPORT_OP_ASYNC_LOCK export flag and update the DLM
plock implementation regarding to it.

Acked-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Documentation/filesystems/nfs/exporting.rst
fs/lockd/svclock.c
fs/nfsd/nfs4state.c
include/linux/exportfs.h