use list_for_each() in fs/dquot.c
PATCH 1/1 use list_for_each() in fs/dquot.c
Use list_for_each() where applicable
From: Domen Puncer <[email protected]>
- for (list = ymf_devs.next; list != &ymf_devs; list = list->next) {
+ list_for_each(list, &ymf_devs) {
pure cosmetic change, defined as a preprocessor macro in:include/linux/list.h
please apply
maks
fs/dquot.c +3 -4
@@ -215,7 +215,7 @@struct list_head *head;struct dquot *dquot; -for (head = dquot_hash[hashent].next; head != dquot_hash+hashent; head = head->next) { +list_for_each (head, &dquot_hash[hashent]) { dquot = list_entry(head, struct dquot, dq_hash);if (dquot->dq_sb == sb && dquot->dq_id == id && dquot->dq_type == type)return dquot;
@@ -289,12 +289,11 @@static void invalidate_dquots (struct super_block *sb,int type) {struct dquot *dquot; -struct list_head *head; +struct list_head *head, *next;spin_lock (&dq_list_lock); -for (head = inuse_list.next; head != &inuse_list;) { +list_for_each_safe (head, next, &inuse_list) { dquot = list_entry(head, struct dquot, dq_inuse); - head = head->next;if (dquot->dq_sb != sb)continue ;if (dquot->dq_type != type)