]> git.hungrycats.org Git - linux/commitdiff
dlm: make posix locks interruptible
authorEric Ren <zren@suse.com>
Wed, 14 Oct 2015 15:28:26 +0000 (23:28 +0800)
committerJiri Slaby <jslaby@suse.cz>
Sat, 9 Jan 2016 10:18:16 +0000 (11:18 +0100)
commit a6b1533e9a57d76cd3d9b7649d29ac604b1874b8 upstream.

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: Eric Ren <zren@suse.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/dlm/plock.c

index f704458ea5f59a78d8b1121508cc9f22acfe6e45..a6d999418de4104a4c193538f793a52d7d4f2704 100644 (file)
@@ -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);