public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vfs: use list_for_each_entry instead
@ 2007-08-16  3:28 Denis Cheng
  0 siblings, 0 replies; only message in thread
From: Denis Cheng @ 2007-08-16  3:28 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-kernel, cr_quan

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 fs/super.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index fc8ebed..f287c15 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -334,15 +334,12 @@ struct super_block *sget(struct file_system_type *type,
 			int (*set)(struct super_block *,void *),
 			void *data)
 {
-	struct super_block *s = NULL;
-	struct list_head *p;
+	struct super_block *s = NULL, *old;
 	int err;
 
 retry:
 	spin_lock(&sb_lock);
-	if (test) list_for_each(p, &type->fs_supers) {
-		struct super_block *old;
-		old = list_entry(p, struct super_block, s_instances);
+	if (test) list_for_each_entry(old, &type->fs_supers, s_instances) {
 		if (!test(old, data))
 			continue;
 		if (!grab_super(old))
-- 
1.5.3.rc4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-16  3:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-16  3:28 [PATCH] vfs: use list_for_each_entry instead Denis Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox