diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-05-29 03:32:44 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-04 23:16:27 +0200 |
commit | 971b2e8a3f5dc0cbef19ec1a77b6d20237aa751e (patch) | |
tree | 83d7129b09c08d74ff2f6e494b71a83243db3925 | |
parent | mqueue doesn't need make_bad_inode() (diff) | |
download | linux-971b2e8a3f5dc0cbef19ec1a77b6d20237aa751e.tar.xz linux-971b2e8a3f5dc0cbef19ec1a77b6d20237aa751e.zip |
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: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/infiniband/hw/qib/qib_fs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c index edef8527eb34..844954bf417b 100644 --- a/drivers/infiniband/hw/qib/qib_fs.c +++ b/drivers/infiniband/hw/qib/qib_fs.c @@ -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) { spin_unlock_irqrestore(&qib_devs_lock, flags); ret = add_cntr_files(sb, dd); - if (ret) { - deactivate_super(sb); + if (ret) goto bail; - } spin_lock_irqsave(&qib_devs_lock, flags); } |