From: Alessio Igor Bogani <abogani@texware.it>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Jonathan Corbet" <corbet@lwn.net>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
LKML <linux-kernel@vger.kernel.org>,
"Alessio Igor Bogani" <abogani@texware.it>
Subject: [PATCH -tip:kill-the-BKL] remove the BKL: remove "BKL auto-drop" assumption from ext3_remount()
Date: Mon, 27 Apr 2009 22:22:28 +0200 [thread overview]
Message-ID: <1240863748-13225-1-git-send-email-abogani@texware.it> (raw)
In-Reply-To: <20090426163924.GD6236@elte.hu>
Fix ext3_remount()'s "schedule() drops the BKL automatically" assumption,
when ext3_mark_recovery_complete(), which can sleep, does not do that it can
lock up.
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
---
fs/ext3/super.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index dc905f9..5d61a7f 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2503,6 +2503,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
#ifdef CONFIG_QUOTA
int i;
#endif
+ int bkl = kernel_locked();
/* Store the original options */
old_sb_flags = sb->s_flags;
@@ -2561,9 +2562,13 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
* We have to unlock super so that we can wait for
* transactions.
*/
+ if (bkl)
+ unlock_kernel();
unlock_super(sb);
ext3_mark_recovery_complete(sb, es);
lock_super(sb);
+ if (bkl)
+ lock_kernel();
} else {
__le32 ret;
if ((ret = EXT3_HAS_RO_COMPAT_FEATURE(sb,
--
1.6.0.4
prev parent reply other threads:[~2009-04-27 20:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 13:16 [PATCH -tip] " Alessio Igor Bogani
2009-04-26 16:39 ` Ingo Molnar
2009-04-27 20:21 ` Alessio Igor Bogani
2009-04-27 20:22 ` Alessio Igor Bogani [this message]
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=1240863748-13225-1-git-send-email-abogani@texware.it \
--to=abogani@texware.it \
--cc=a.p.zijlstra@chello.nl \
--cc=corbet@lwn.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®