Skip to content

Commit 6bd4a2b

Browse files
Alexander Aringteigland
authored andcommitted
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>
1 parent dbee1ad commit 6bd4a2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/dlm/plock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
140140
op->info.optype = DLM_PLOCK_OP_LOCK;
141141
op->info.pid = fl->fl_pid;
142142
op->info.ex = (fl->fl_type == F_WRLCK);
143-
op->info.wait = IS_SETLKW(cmd);
143+
op->info.wait = !!(fl->fl_flags & FL_SLEEP);
144144
op->info.fsid = ls->ls_global_id;
145145
op->info.number = number;
146146
op->info.start = fl->fl_start;

0 commit comments

Comments
 (0)