Coda File System

[patch] use list_for_each() in fs/coda/psdev.c

From: maximilian attems <janitor_at_sternwelten.at>
Date: Wed, 10 Sep 2003 10:38:41 -0400
Use list_for_each() where applicable
From: Domen Puncer <domen_at_coderock.org>
- 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


--- linux-2.6.0-test5/fs/coda/psdev.c	Mon Sep  8 21:50:08 2003
+++ linux/fs/coda/psdev.c	Wed Sep 10 12:13:24 2003
@@ -325,10 +325,7 @@
 	}
         
         /* Wakeup clients so they can return. */
-	lh = vcp->vc_pending.next;
-	next = lh;
-	while ( (lh = next) != &vcp->vc_pending) {
-		next = lh->next;
+	list_for_each_safe(lh, next, &vcp->vc_pending) {
 		req = list_entry(lh, struct upc_req, uc_chain);
 		/* Async requests need to be freed here */
 		if (req->uc_flags & REQ_ASYNC) {
@@ -340,8 +337,7 @@
 		wake_up(&req->uc_sleep);
         }
         
-	lh = &vcp->vc_processing;
-	while ( (lh = lh->next) != &vcp->vc_processing) {
+	list_for_each(lh, &vcp->vc_processing) {
 		req = list_entry(lh, struct upc_req, uc_chain);
 		req->uc_flags |= REQ_ABORT;
 	        wake_up(&req->uc_sleep);

Received on 2003-09-10 11:11:21