Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6b1533e authored by Eric Ren's avatar Eric Ren Committed by David Teigland
Browse files

dlm: make posix locks interruptible



Replace wait_event_killable with wait_event_interruptible
so that a program waiting for a posix lock can be
interrupted by a signal.  With the killable version,
a program was not interruptible by a signal if it
had a signal handler set for it, overriding the default
action of terminating the process.

Signed-off-by: default avatarEric Ren <zren@suse.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 7379047d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
	send_op(op);

	if (xop->callback == NULL) {
		rv = wait_event_killable(recv_wq, (op->done != 0));
		rv = wait_event_interruptible(recv_wq, (op->done != 0));
		if (rv == -ERESTARTSYS) {
			log_debug(ls, "dlm_posix_lock: wait killed %llx",
				  (unsigned long long)number);