Skip to content

Commit

Permalink
[PATCH] use list_add_tail() instead of list_add()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Jun 26, 2006
1 parent 38e1392 commit 8e13059
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fs/coda/psdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion fs/coda/upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static int select_parent(struct dentry * parent)
* 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++;
}
Expand Down
4 changes: 2 additions & 2 deletions fs/dquot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand All @@ -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++;
}

Expand Down

0 comments on commit 8e13059

Please sign in to comment.