Commit 971b2e8a authored by Al Viro's avatar Al Viro

fix the deadlock in qib_fs

get_sb_single() calls fill_super with superblock locked; calling
deactivate_super() will deadlock immedately.  Moreover, if fill_super
callback returns an error, get_sb_single() will release the reference
to superblock itself just fine.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0abbb609
...@@ -542,10 +542,8 @@ static int qibfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -542,10 +542,8 @@ static int qibfs_fill_super(struct super_block *sb, void *data, int silent)
list_for_each_entry_safe(dd, tmp, &qib_dev_list, list) { list_for_each_entry_safe(dd, tmp, &qib_dev_list, list) {
spin_unlock_irqrestore(&qib_devs_lock, flags); spin_unlock_irqrestore(&qib_devs_lock, flags);
ret = add_cntr_files(sb, dd); ret = add_cntr_files(sb, dd);
if (ret) { if (ret)
deactivate_super(sb);
goto bail; goto bail;
}
spin_lock_irqsave(&qib_devs_lock, flags); spin_lock_irqsave(&qib_devs_lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment