staging: lustre: use list_last_entry to simplify fld_cache_shrink

Using list_empty() and list_last_entry() makes the code clearer,
and allows a local variable to be discarded.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
NeilBrown 2017-12-13 14:15:54 +11:00 • committed by Greg Kroah-Hartman
commit 7d5ea743bc