mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 04:09:18 -04:00
staging: lustre: ldlm: use list_for_each_entry in ldlm_extent_shift_kms()
Using list_for_each_entry() means we don't need 'tmp'. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7d5ea743bc
commit
7b38c293d6
@@ -64,7 +64,6 @@
|
||||
__u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms)
|
||||
{
|
||||
struct ldlm_resource *res = lock->l_resource;
|
||||
struct list_head *tmp;
|
||||
struct ldlm_lock *lck;
|
||||
__u64 kms = 0;
|
||||
|
||||
@@ -74,8 +73,7 @@ __u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms)
|
||||
*/
|
||||
ldlm_set_kms_ignore(lock);
|
||||
|
||||
list_for_each(tmp, &res->lr_granted) {
|
||||
lck = list_entry(tmp, struct ldlm_lock, l_res_link);
|
||||
list_for_each_entry(lck, &res->lr_granted, l_res_link) {
|
||||
|
||||
if (ldlm_is_kms_ignore(lck))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user