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>
Showing
Please register or sign in to comment