staging: lustre: fid: remove seq_fid_alloc_fini() and simplify
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)
commit8ede253133d45d510dacfde86ba836fd301e8c06
treed511527948454c8b3bbd54ef93f916bd4aa937e0
parent40f5bd35015501c2964cb3450b52273c1ae36ba2
staging: lustre: fid: remove seq_fid_alloc_fini() and simplify

seq_fid_alloc_fini() is tiny and only called
from two places in the one function.  We can move
both those calls earlier and merge them so only
one call is needed.  At that point, there is no
value added by having a separate function.

Also instead of using ++ and -- on ->lcs_update to
toggle between 0 and 1, explicitly set to 0 or 1
as appropriate.

Moving the locking earlier means that the code which updates
seq->lcs_fid is now protected, so
ldebugfs_fid_fid_seq_show() now cannot see a torn value.

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