From: Matthias Kaehlcke fs/super.c: use list_for_each_entry() instead of list_for_each() in sget() Signed-off-by: Matthias Kaehlcke Signed-off-by: Andrew Morton --- fs/super.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff -puN fs/super.c~fs-superc-use-list_for_each_entry-instead-of-list_for_each fs/super.c --- a/fs/super.c~fs-superc-use-list_for_each_entry-instead-of-list_for_each +++ a/fs/super.c @@ -332,14 +332,12 @@ struct super_block *sget(struct file_sys void *data) { struct super_block *s = NULL; - struct list_head *p; + struct super_block *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)) _