Skip to content

Commit

Permalink
fs/inode.c: use hlist_for_each_entry()
Browse files Browse the repository at this point in the history
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 <matthias@kaehlcke.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Matthias Kaehlcke authored and Linus Torvalds committed Apr 29, 2008
1 parent af065b8 commit c5c8be3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit c5c8be3

Please sign in to comment.