summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-07-16 08:40:23 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 18:05:45 +0200
commit203a2935c734c054bfd4665fb5d8835498af50a8 (patch)
tree5b6dc4e6a1987f015156005ab249a525fa4175a1 /fs
parentmutex_unlock() later in seq_lseek() (diff)
downloadlinux-203a2935c734c054bfd4665fb5d8835498af50a8.tar.xz
linux-203a2935c734c054bfd4665fb5d8835498af50a8.zip
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 <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/block_dev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index b3e9bfa748cf..da5f0515e8eb 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);