Commit ad9b568a authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds

[PATCH] Drop spin lock when calling request_module in quota code

From Herbert Xu
parent 95450709
...@@ -128,16 +128,17 @@ static struct quota_format_type *find_quota_format(int id) ...@@ -128,16 +128,17 @@ static struct quota_format_type *find_quota_format(int id)
if (!actqf || !try_module_get(actqf->qf_owner)) { if (!actqf || !try_module_get(actqf->qf_owner)) {
int qm; int qm;
spin_unlock(&dq_list_lock);
for (qm = 0; module_names[qm].qm_fmt_id && module_names[qm].qm_fmt_id != id; qm++); for (qm = 0; module_names[qm].qm_fmt_id && module_names[qm].qm_fmt_id != id; qm++);
if (!module_names[qm].qm_fmt_id || request_module(module_names[qm].qm_mod_name)) { if (!module_names[qm].qm_fmt_id || request_module(module_names[qm].qm_mod_name))
actqf = NULL; return NULL;
goto out;
} spin_lock(&dq_list_lock);
for (actqf = quota_formats; actqf && actqf->qf_fmt_id != id; actqf = actqf->qf_next); for (actqf = quota_formats; actqf && actqf->qf_fmt_id != id; actqf = actqf->qf_next);
if (actqf && !try_module_get(actqf->qf_owner)) if (actqf && !try_module_get(actqf->qf_owner))
actqf = NULL; actqf = NULL;
} }
out:
spin_unlock(&dq_list_lock); spin_unlock(&dq_list_lock);
return actqf; return actqf;
} }
......
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