mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	torvalds@osdl.org, akpm@osdl.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [QUOTA] Drop spin lock when calling request_module
Date: Thu, 6 Nov 2003 17:18:24 +0100	[thread overview]
Message-ID: <20031106161823.GC25830@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20031105111025.GA2337@gondor.apana.org.au>

  Hi,

> This patch drops the spin lock when calling request_module as the
> latter will sleep.
  The patch looks right. Linus please apply if you find it serious
enough (or Andrew please queue it up for next releases...)...

							Thanks
								Honza

Index: kernel-source-2.5/fs/dquot.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/fs/dquot.c,v
retrieving revision 1.3
diff -u -r1.3 dquot.c
--- kernel-source-2.5/fs/dquot.c	26 Oct 2003 03:20:37 -0000	1.3
+++ kernel-source-2.5/fs/dquot.c	5 Nov 2003 11:04:30 -0000
@@ -128,17 +128,21 @@
 	if (!actqf || !try_module_get(actqf->qf_owner)) {
 		int qm;
 
+		spin_unlock(&dq_list_lock);
+
 		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)) {
 			actqf = NULL;
 			goto out;
 		}
+
+		spin_lock(&dq_list_lock);
 		for (actqf = quota_formats; actqf && actqf->qf_fmt_id != id; actqf = actqf->qf_next);
 		if (actqf && !try_module_get(actqf->qf_owner))
 			actqf = NULL;
 	}
-out:
 	spin_unlock(&dq_list_lock);
+out:
 	return actqf;
 }

  reply	other threads:[~2003-11-06 16:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05 11:10 Herbert Xu
2003-11-06 16:18 ` Jan Kara [this message]
2003-11-06 16:28   ` Linus Torvalds
2003-11-06 18:11     ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031106161823.GC25830@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=akpm@osdl.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®