From c5c8be3ce59dc59baf20b33dae3f8eb70af7b1f1 Mon Sep 17 00:00:00 2001 From: Matthias Kaehlcke Date: Tue, 29 Apr 2008 00:59:40 -0700 Subject: [PATCH] fs/inode.c: use hlist_for_each_entry() fs/inode.c: use hlist_for_each_entry() in find_inode() and find_inode_fast() [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Matthias Kaehlcke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 27ee1af50d02..bf6478130424 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -495,8 +495,7 @@ static struct inode * find_inode(struct super_block * sb, struct hlist_head *hea struct inode * inode = NULL; repeat: - hlist_for_each (node, head) { - inode = hlist_entry(node, struct inode, i_hash); + hlist_for_each_entry(inode, node, head, i_hash) { if (inode->i_sb != sb) continue; if (!test(inode, data)) @@ -520,8 +519,7 @@ static struct inode * find_inode_fast(struct super_block * sb, struct hlist_head struct inode * inode = NULL; repeat: - hlist_for_each (node, head) { - inode = hlist_entry(node, struct inode, i_hash); + hlist_for_each_entry(inode, node, head, i_hash) { if (inode->i_ino != ino) continue; if (inode->i_sb != sb) -- 2.30.2