OSDN Git Service

staging: lustre: use wait_event_idle_timeout in ptlrpcd()
authorNeilBrown <neilb@suse.com>
Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 14:19:11 +0000 (15:19 +0100)
commitc7621ba215b11ca8976d38093768b8630df3d0d6
treeb3fe19ce31bfc9c6f333d663d5e3c8a64f71a2a1
parent1307a0fdf9f8d56c7b1a5a5f7de8e0a2ec193e10
staging: lustre: use wait_event_idle_timeout in ptlrpcd()

We can replace l_wait_event() with
wait_event_idle_timeout() here providing we call the
timeout function when wait_event_idle_timeout() returns zero.

As ptlrpc_expired_set() returns 1, the l_wait_event() aborts of the
first timeout.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/client.c
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c