Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4730127 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds
Browse files

fs/super.c: use list_for_each_entry() instead of list_for_each()



fs/super.c: use list_for_each_entry() instead of list_for_each() in
sget()

[akpm@linux-foundation.org: clean up some crap while we're there]
Signed-off-by: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b70c3940
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -332,14 +332,13 @@ struct super_block *sget(struct file_system_type *type,
			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))
@@ -348,6 +347,7 @@ struct super_block *sget(struct file_system_type *type,
				destroy_super(s);
			return old;
		}
	}
	if (!s) {
		spin_unlock(&sb_lock);
		s = alloc_super(type);