]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: ldlm: remove unnecessary 'ownlocks' variable.
authorNeilBrown <neilb@suse.com>
Mon, 23 Oct 2017 00:53:49 +0000 (11:53 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Nov 2017 14:00:34 +0000 (15:00 +0100)
commit1d9f41ae04517cba77c4af45fa147df43eaae086
tree2ffef76b4a4c937c0128a69cdb5bf762ba06c5fd
parent652e38bc2308338b5a71bd0efaa9cd33c8e851cc
staging: lustre: ldlm: remove unnecessary 'ownlocks' variable.

Now that the code has been simplified, 'ownlocks' is not
necessary.

The loop which sets it exits with 'lock' having the same value as
'ownlocks', or pointing to the head of the list if ownlocks is NULL.

The current code then tests ownlocks and sets 'lock' to exactly the
value that it currently has.

So discard 'ownlocks'.

Also remove unnecessary initialization of 'lock'.

Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c