summaryrefslogtreecommitdiff
path: root/fs/block_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 30ec91b830d4..af9264109098 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -337,7 +337,7 @@ static struct block_device *bdfind(dev_t dev, struct list_head *head)
{
struct list_head *p;
struct block_device *bdev;
- for (p=head->next; p!=head; p=p->next) {
+ list_for_each(p, head) {
bdev = list_entry(p, struct block_device, bd_hash);
if (bdev->bd_dev != dev)
continue;