[PATCH] list_for_each_entry: fs-dquot.c

Make code more readable with list_for_each_entry_safe.

Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Domen Puncer and committed by Linus Torvalds c33ed271 97998d8f

+2 -5
+2 -5
fs/dquot.c
··· 409 409 * for this sb+type at all. */ 410 410 static void invalidate_dquots(struct super_block *sb, int type) 411 411 { 412 - struct dquot *dquot; 413 - struct list_head *head; 412 + struct dquot *dquot, *tmp; 414 413 415 414 spin_lock(&dq_list_lock); 416 - for (head = inuse_list.next; head != &inuse_list;) { 417 - dquot = list_entry(head, struct dquot, dq_inuse); 418 - head = head->next; 415 + list_for_each_entry_safe(dquot, tmp, &inuse_list, dq_inuse) { 419 416 if (dquot->dq_sb != sb) 420 417 continue; 421 418 if (dquot->dq_type != type)