From: Chris Wright <chrisw@sous-sol.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Alessio Igor Bogani <abogani@texware.it>, linux-kernel@vger.kernel.org
Subject: [PATCH] fs/super.c BKL push down fixup
Date: Tue, 16 Jun 2009 12:42:05 -0700 [thread overview]
Message-ID: <20090616194205.GH30071@sequoia.sous-sol.org> (raw)
$ sudo mount -oremount,ro /
[44126.724760] ------------[ cut here ]------------
[44126.725188] kernel BUG at lib/kernel_lock.c:126!
Commit "337eb00: Push BKL down into ->remount_fs()" does not completely
push BKL down, leaving a few stray unlock_kernel() calls behind on error
paths.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
fs/super.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/fs/super.c b/fs/super.c
index 83b4741..0b494b5 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -545,24 +545,19 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
if ((flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY)) {
if (force)
mark_files_ro(sb);
- else if (!fs_may_remount_ro(sb)) {
- unlock_kernel();
+ else if (!fs_may_remount_ro(sb))
return -EBUSY;
- }
+
retval = vfs_dq_off(sb, 1);
- if (retval < 0 && retval != -ENOSYS) {
- unlock_kernel();
+ if (retval < 0 && retval != -ENOSYS)
return -EBUSY;
- }
}
remount_rw = !(flags & MS_RDONLY) && (sb->s_flags & MS_RDONLY);
if (sb->s_op->remount_fs) {
retval = sb->s_op->remount_fs(sb, &flags, data);
- if (retval) {
- unlock_kernel();
+ if (retval)
return retval;
- }
}
sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
if (remount_rw)
reply other threads:[~2009-06-16 19:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090616194205.GH30071@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=abogani@texware.it \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome