Whamcloud - gitweb
LU-10467 ldlm: convert waiting in ldlm_flock_completion_ast() 84/35984/11
authorMr NeilBrown <neilb@suse.com>
Sat, 18 Jan 2020 14:19:29 +0000 (09:19 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 8 Feb 2020 04:00:05 +0000 (04:00 +0000)
commitf10a447fb4ca44d396f7f17bdceedfbd03ab2581
treea32742d2d8cea9ea5ac83df23f13de2e54a4d836
parent4e5855ae4dea7954ce1891cd23abce033fe23f03
LU-10467 ldlm: convert waiting in ldlm_flock_completion_ast()

The l_wait_event() call in ldlm_flock_completion_ast() sets no
timeout, and so always enables fatal signals.  So it can be converted
to l_wait_event_abortable().

It is passed an on_signal handler, so that needs to be called if
l_wait_event_abortable() returns a negative result.  As this is the
only place the handler is call, it can be inlined.  We already have an
'if' which captures the 'wait was interrupted' condition, so place the
signal handler code in there.

This makes struct ldlm_flock_wait_data redundant.  In fact the
fwd_genertion field in there was already unused.

Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: I9cc3a3e8b593a66f46183584382dc13169ff9adf
Reviewed-on: https://review.whamcloud.com/35984
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_flock.c