Whamcloud - gitweb
LU-9859 libcfs: remove unnecessary cfs_block_allsigs() calls 50/35350/15
authorNeilBrown <neilb@suse.com>
Mon, 10 Feb 2020 14:06:31 +0000 (09:06 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 20 Feb 2020 07:14:11 +0000 (07:14 +0000)
commit8e877a6f5cc894d0c0ec283d63faff05f8d97fea
tree5f26c458bcfbb37fcbf55cc63d479d3d34a213d3
parent8e88bbfef5795b3bf9541c8cb5b2dd8a3bb11d9f
LU-9859 libcfs: remove unnecessary cfs_block_allsigs() calls

Threads started by kthread_run() ignore all signals,
as kthreadd() calls ignore_signals(), and this is
inherited by all children.
So there is no need to call cfs_block_allsigs() in functions
that are only run from kthread_run().

For the case of lnet_ping_md_unlink() it is not from a kernel
thread but nothing in that function should be affected by
signals so it is safe to remove.

For lnet_ping() we need to manually block signals since
LNetEQPool() can unconditionally abort when a signal is
recieved.

Linux-commit: 1b2dad1459e480028a2714439048d8a634132857

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I124dccf78a3187d5f4a31c7b76db5369aaafc369
Reviewed-on: https://review.whamcloud.com/35350
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 files changed:
libcfs/include/libcfs/libcfs.h
libcfs/libcfs/linux/linux-prim.c
libcfs/libcfs/workitem.c
lnet/klnds/gnilnd/gnilnd_cb.c
lnet/klnds/gnilnd/gnilnd_conn.c
lnet/klnds/gnilnd/gnilnd_stack.c
lnet/klnds/o2iblnd/o2iblnd_cb.c
lnet/klnds/socklnd/socklnd_cb.c
lnet/lnet/acceptor.c
lnet/lnet/api-ni.c
lnet/lnet/lib-move.c
lnet/lnet/peer.c
lnet/selftest/timer.c