diff options
author | Jan Harkes <jaharkes@cs.cmu.edu> | 2005-01-10 17:26:51 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-10 17:26:51 -0800 |
commit | 9db7f4514f8075f407c81ee82807b58438e27caf (patch) | |
tree | a9642715d21321217b36c7602dc6f966a8e53cc8 /fs | |
parent | e926095b7dd6e715d931486f16a85250807dae64 (diff) | |
download | history-9db7f4514f8075f407c81ee82807b58438e27caf.tar.gz |
[PATCH] code: ulist_for_each_entry_safe()
Use list_for_each_entry_safe to make code more readable. Compile tested.
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/coda/psdev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index f115e41d4ccaf8..c2306b5f64565e 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -309,8 +309,7 @@ static int coda_psdev_open(struct inode * inode, struct file * file) static int coda_psdev_release(struct inode * inode, struct file * file) { struct venus_comm *vcp = (struct venus_comm *) file->private_data; - struct upc_req *req; - struct list_head *lh, *next; + struct upc_req *req, *tmp; lock_kernel(); if ( !vcp->vc_inuse ) { @@ -325,8 +324,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) } /* Wakeup clients so they can return. */ - list_for_each_safe(lh, next, &vcp->vc_pending) { - req = list_entry(lh, struct upc_req, uc_chain); + list_for_each_entry_safe(req, tmp, &vcp->vc_pending, uc_chain) { /* Async requests need to be freed here */ if (req->uc_flags & REQ_ASYNC) { CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr)); |