[PATCH] use list_add_tail() instead of list_add()
authorAkinobu Mita <mita@miraclelinux.com>
Mon, 26 Jun 2006 07:24:37 +0000 (00:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:17 +0000 (09:58 -0700)
This patch converts list_add(A, B.prev) to list_add_tail(A, &B) for
readability.

Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Acked-by: Jan Kara <jack@suse.cz>
AOLed-by: David Woodhouse <dwmw2@infradead.org>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/coda/psdev.c
fs/coda/upcall.c
fs/dcache.c
fs/dquot.c

index 6c6771db36da4f482f123a42f92c852e90cf05fd..7caee8d8ea3b9a24656f40a20c247986f796d39f 100644 (file)
@@ -259,7 +259,7 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf,
        /* If request was not a signal, enqueue and don't free */
        if (!(req->uc_flags & REQ_ASYNC)) {
                req->uc_flags |= REQ_READ;
-               list_add(&(req->uc_chain), vcp->vc_processing.prev);
+               list_add_tail(&(req->uc_chain), &vcp->vc_processing);
                goto out;
        }
 
index b040eba13a7daf8883e26508c46cbddf9fcda295..a5b5e631ba61e695af8e8b1d376f971cefcca082 100644 (file)
@@ -725,7 +725,7 @@ static int coda_upcall(struct coda_sb_info *sbi,
        ((union inputArgs *)buffer)->ih.unique = req->uc_unique;
 
        /* Append msg to pending queue and poke Venus. */
-       list_add(&(req->uc_chain), vcommp->vc_pending.prev);
+       list_add_tail(&(req->uc_chain), &vcommp->vc_pending);
         
        wake_up_interruptible(&vcommp->vc_waitq);
        /* We can be interrupted while we wait for Venus to process
index b85fda360533a217fd0ee5e45e892e9c6995db35..6aa635fbfa0a6eaec2c00316a2014b2c5e0ed268 100644 (file)
@@ -638,7 +638,7 @@ resume:
                 * of the unused list for prune_dcache
                 */
                if (!atomic_read(&dentry->d_count)) {
-                       list_add(&dentry->d_lru, dentry_unused.prev);
+                       list_add_tail(&dentry->d_lru, &dentry_unused);
                        dentry_stat.nr_unused++;
                        found++;
                }
index 81d87a413c68c48c542f06c8bb5982f179f01072..0122a279106a9dd4a0475557901471be5c428546 100644 (file)
@@ -250,7 +250,7 @@ static inline struct dquot *find_dquot(unsigned int hashent, struct super_block
 /* Add a dquot to the tail of the free list */
 static inline void put_dquot_last(struct dquot *dquot)
 {
-       list_add(&dquot->dq_free, free_dquots.prev);
+       list_add_tail(&dquot->dq_free, &free_dquots);
        dqstats.free_dquots++;
 }
 
@@ -266,7 +266,7 @@ static inline void put_inuse(struct dquot *dquot)
 {
        /* We add to the back of inuse list so we don't have to restart
         * when traversing this list and we block */
-       list_add(&dquot->dq_inuse, inuse_list.prev);
+       list_add_tail(&dquot->dq_inuse, &inuse_list);
        dqstats.allocated_dquots++;
 }