staging: lustre: simplify l_wait_event when intr handler but no timeout.
authorNeilBrown <neilb@suse.com>
Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 14:19:10 +0000 (15:19 +0100)
commitd7ce88fbb5dbc2263eb3a6a0c9888c17d65ffa97
treebb2e40c04401cb9008f95873b9f2ede15b196ad1
parenteb7e1f3a3b051723b1e0ec51d59568c7650a545b
staging: lustre: simplify l_wait_event when intr handler but no timeout.

If l_wait_event() is given a function to be called on a signal,
but no timeout or timeout handler, then the intr function is simply
called at the end if the wait was aborted by a signal.
So a simpler way to write the code (in the one place this case is
used) it to open-code the body of the function after the
wait_event, if -ERESTARTSYS was returned.

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/ldlm/ldlm_flock.c