diff options
author | Alexander Aring <aahringo@redhat.com> | 2023-11-13 22:24:10 +0100 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2023-11-16 18:59:19 +0100 |
commit | 6bd4a2bfe568d963af721cc5efa52091bf1a3746 (patch) | |
tree | 4b64c00c941262a866a24744b6861fd70664e931 /fs/dlm | |
parent | dlm: use fl_owner from lockd (diff) | |
download | linux-6bd4a2bfe568d963af721cc5efa52091bf1a3746.tar.xz linux-6bd4a2bfe568d963af721cc5efa52091bf1a3746.zip |
dlm: use FL_SLEEP to determine blocking vs non-blocking
This patch uses the FL_SLEEP flag in struct file_lock to determine if
the lock request is a blocking or non-blocking request. Before dlm was
using IS_SETLKW() was being used which is not usable for lock requests
coming from lockd when EXPORT_OP_SAFE_ASYNC_LOCK inside the export flags
is set.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/plock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index ee6e0236d4f8..d814c5121367 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -140,7 +140,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file, op->info.optype = DLM_PLOCK_OP_LOCK; op->info.pid = fl->fl_pid; op->info.ex = (fl->fl_type == F_WRLCK); - op->info.wait = IS_SETLKW(cmd); + op->info.wait = !!(fl->fl_flags & FL_SLEEP); op->info.fsid = ls->ls_global_id; op->info.number = number; op->info.start = fl->fl_start; |