From: Vasily Averin <vvs@sw.ru>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
David Howells <dhowells@redhat.com>, Jan Blunck <jblunck@suse.de>,
Andrew Morton <akpm@osdl.org>,
Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Kirill Korotaev <dev@openvz.org>, devel@openvz.org
Subject: [PATCH 2.6.19-rc3-mm1] VFS: BKL is not required for remount_fs()
Date: Mon, 30 Oct 2006 17:32:15 +0300 [thread overview]
Message-ID: <45460CEF.2060801@sw.ru> (raw)
From: Vasily Averin <vvs@sw.ru>
according to Documentation/filesystems/Locking remount_fs() is not requires BKL
Signed-off-by: Vasily Averin <vvs@sw.ru>
--- linux-2.6.19-rc3-mm1/fs/namespace.c.blkrm 2006-10-30 14:36:09.000000000 +0300
+++ linux-2.6.19-rc3-mm1/fs/namespace.c 2006-10-30 14:33:05.000000000 +0300
@@ -594,10 +594,8 @@ static int do_umount(struct vfsmount *mn
*/
down_write(&sb->s_umount);
if (!(sb->s_flags & MS_RDONLY)) {
- lock_kernel();
DQUOT_OFF(sb);
retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
- unlock_kernel();
}
up_write(&sb->s_umount);
return retval;
--- linux-2.6.19-rc3-mm1/fs/super.c.blkrm 2006-10-30 14:36:01.000000000 +0300
+++ linux-2.6.19-rc3-mm1/fs/super.c 2006-10-30 14:33:05.000000000 +0300
@@ -609,16 +609,8 @@ static void do_emergency_remount(unsigne
sb->s_count++;
spin_unlock(&sb_lock);
down_read(&sb->s_umount);
- if (sb->s_root && sb->s_bdev && !(sb->s_flags & MS_RDONLY)) {
- /*
- * ->remount_fs needs lock_kernel().
- *
- * What lock protects sb->s_flags??
- */
- lock_kernel();
+ if (sb->s_root && sb->s_bdev && !(sb->s_flags & MS_RDONLY))
do_remount_sb(sb, MS_RDONLY, NULL, 1);
- unlock_kernel();
- }
drop_super(sb);
spin_lock(&sb_lock);
}
reply other threads:[~2006-10-30 14:32 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=45460CEF.2060801@sw.ru \
--to=vvs@sw.ru \
--cc=akpm@osdl.org \
--cc=dev@openvz.org \
--cc=devel@openvz.org \
--cc=dhowells@redhat.com \
--cc=jblunck@suse.de \
--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