staging: lustre: improve API and implementation of blocking signals.
authorNeilBrown <neilb@suse.com>
Tue, 20 Feb 2018 02:23:37 +0000 (13:23 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 14:03:23 +0000 (15:03 +0100)
commit84e07b9d0ac8728b1865b23498d746861a8ab4c2
tree64f69d4be6a220cf4584e1be50e1e3639d58b3b7
parent99c1ffc99a570c68cef906d9763edb47b316ea1a
staging: lustre: improve API and implementation of blocking signals.

According to comment for set_current_blocked() in
kernel/signal.c, changing ->blocked directly is wrong.
sigprocmask() should be called instead.

So change cfs_block_sigsinv() and cfs_restore_sigs()
to use sigprocmask().
For consistency, change them to pass the sigset_t by reference
rather than by value.

Also fix cfs_block_sigsinv() so that it correctly blocks
signals above 32 on a 32bit host.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c
drivers/staging/lustre/lustre/include/lustre_lib.h
drivers/staging/lustre/lustre/llite/llite_mmap.c