[PATCH] fs/inode.c: use hlist_for_each_entry()

Previous thread: [PATCH 2.6.25] module: allow ndiswrapper to use GPL-only symbols by Pavel Roskin on Thursday, February 28, 2008 - 6:11 pm. (39 messages)

Next thread: Re: [PATCH 3/3] Consolidate send_sigqueue and send_group_sigqueue by Thomas Gleixner on Thursday, February 28, 2008 - 6:32 pm. (3 messages)
To: <viro@...>, <linux-fsdevel@...>
Cc: <linux-kernel@...>, <akpm@...>
Date: Thursday, February 28, 2008 - 6:11 pm

fs/inode.c: use hlist_for_each_entry() in find_inode() and
find_inode_fast()

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>

--

diff --git a/fs/inode.c b/fs/inode.c
index 53245ff..ab5dfc2 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)

--
Matthias Kaehlcke
Linux System Developer
Barcelona

The assumption that what currently exists must necessarily
exist is the acid that corrodes all visionary thinking
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
--

Previous thread: [PATCH 2.6.25] module: allow ndiswrapper to use GPL-only symbols by Pavel Roskin on Thursday, February 28, 2008 - 6:11 pm. (39 messages)

Next thread: Re: [PATCH 3/3] Consolidate send_sigqueue and send_group_sigqueue by Thomas Gleixner on Thursday, February 28, 2008 - 6:32 pm. (3 messages)