staging: lustre: fid: use wait_event_cmd()
authorNeilBrown <neilb@suse.com>
Tue, 20 Feb 2018 02:23:38 +0000 (13:23 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 14:06:36 +0000 (15:06 +0100)
commit40f5bd35015501c2964cb3450b52273c1ae36ba2
tree6269d88142faebf12a08ce23a811986204dc6368
parentdaa5611c716a6dbd234c7ebe4ed2c05eeb96b538
staging: lustre: fid: use wait_event_cmd()

Rather than open-coding a wait event loop twice,
use wait_event_cmd() to wait, dropping the spinlock
over schedule().
This does require duplicating part of the wait
condition, but that is just three tests on values that
are in registers or in cache, so the cost is small
and the increased readability is large.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/fid/fid_request.c