[002/151] lustre: fix signal handling in abortable waits.
diff mbox series

Message ID 1569869810-23848-3-git-send-email-jsimmons@infradead.org
State New
Headers show
Series
  • lustre: update to 2.11 support
Related show

Commit Message

James Simmons Sept. 30, 2019, 6:54 p.m. UTC
From: NeilBrown <neilb@suse.com>

Instead of blocking all but the fatal signals, we were
blocking just the fatal signals.  That wasn't what was
intended, but is easy to fix.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/include/lustre_lib.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/fs/lustre/include/lustre_lib.h b/fs/lustre/include/lustre_lib.h
index da86e46..64d2e91 100644
--- a/fs/lustre/include/lustre_lib.h
+++ b/fs/lustre/include/lustre_lib.h
@@ -93,7 +93,7 @@  static inline int l_fatal_signal_pending(struct task_struct *p)
 ({									\
 	sigset_t __new_blocked, __old_blocked;				\
 	int __ret = 0;							\
-	siginitset(&__new_blocked, LUSTRE_FATAL_SIGS);			\
+	siginitsetinv(&__new_blocked, LUSTRE_FATAL_SIGS);		\
 	sigprocmask(SIG_BLOCK, &__new_blocked, &__old_blocked);		\
 	__ret = wait_event_interruptible(wq, condition);		\
 	sigprocmask(SIG_SETMASK, &__old_blocked, NULL);			\
@@ -104,7 +104,7 @@  static inline int l_fatal_signal_pending(struct task_struct *p)
 ({									\
 	sigset_t __new_blocked, __old_blocked;				\
 	int __ret = 0;							\
-	siginitset(&__new_blocked, LUSTRE_FATAL_SIGS);			\
+	siginitsetinv(&__new_blocked, LUSTRE_FATAL_SIGS);		\
 	sigprocmask(SIG_BLOCK, &__new_blocked, &__old_blocked);		\
 	__ret = wait_event_interruptible_timeout(wq, condition, timeout);\
 	sigprocmask(SIG_SETMASK, &__old_blocked, NULL);			\
@@ -115,7 +115,7 @@  static inline int l_fatal_signal_pending(struct task_struct *p)
 ({									\
 	sigset_t __new_blocked, __old_blocked;				\
 	int __ret = 0;							\
-	siginitset(&__new_blocked, LUSTRE_FATAL_SIGS);			\
+	siginitsetinv(&__new_blocked, LUSTRE_FATAL_SIGS);		\
 	sigprocmask(SIG_BLOCK, &__new_blocked, &__old_blocked);		\
 	__ret = wait_event_interruptible_exclusive(wq, condition);	\
 	sigprocmask(SIG_SETMASK, &__old_blocked, NULL);			\