diff options
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/super.c b/fs/super.c index d62629c6c0cb..feaae7eeaffd 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -332,21 +332,21 @@ struct super_block *sget(struct file_system_type *type, | |||
332 | void *data) | 332 | void *data) |
333 | { | 333 | { |
334 | struct super_block *s = NULL; | 334 | struct super_block *s = NULL; |
335 | struct list_head *p; | 335 | struct super_block *old; |
336 | int err; | 336 | int err; |
337 | 337 | ||
338 | retry: | 338 | retry: |
339 | spin_lock(&sb_lock); | 339 | spin_lock(&sb_lock); |
340 | if (test) list_for_each(p, &type->fs_supers) { | 340 | if (test) { |
341 | struct super_block *old; | 341 | list_for_each_entry(old, &type->fs_supers, s_instances) { |
342 | old = list_entry(p, struct super_block, s_instances); | 342 | if (!test(old, data)) |
343 | if (!test(old, data)) | 343 | continue; |
344 | continue; | 344 | if (!grab_super(old)) |
345 | if (!grab_super(old)) | 345 | goto retry; |
346 | goto retry; | 346 | if (s) |
347 | if (s) | 347 | destroy_super(s); |
348 | destroy_super(s); | 348 | return old; |
349 | return old; | 349 | } |
350 | } | 350 | } |
351 | if (!s) { | 351 | if (!s) { |
352 | spin_unlock(&sb_lock); | 352 | spin_unlock(&sb_lock); |