Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=203a2935c734c054bfd4665fb5d8835498af50a8
Commit:     203a2935c734c054bfd4665fb5d8835498af50a8
Parent:     00c5746da9fc6a793b9d94a8001ded5929f3a773
Author:     Matthias Kaehlcke <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 15 23:40:23 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 09:05:45 2007 -0700

    fs/block_dev.c: use list_for_each_entry()
    
    fs/block_dev.c: Use list_for_each_entry() instead of list_for_each()
    in nr_blockdev_pages()
    
    Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/block_dev.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index b3e9bfa..da5f051 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -588,12 +588,10 @@ EXPORT_SYMBOL(bdget);
 
 long nr_blockdev_pages(void)
 {
-       struct list_head *p;
+       struct block_device *bdev;
        long ret = 0;
        spin_lock(&bdev_lock);
-       list_for_each(p, &all_bdevs) {
-               struct block_device *bdev;
-               bdev = list_entry(p, struct block_device, bd_list);
+       list_for_each_entry(bdev, &all_bdevs, bd_list) {
                ret += bdev->bd_inode->i_mapping->nrpages;
        }
        spin_unlock(&bdev_lock);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to