From: Jan Blunck <jblunck@suse.de>
To: linux-fsdevel@vger.kernel.org
Cc: Linux-Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
jkacur@redhat.com, Thomas Gleixner <tglx@linutronix.de>,
Christoph Hellwig <hch@infradead.org>,
Arnd Bergmann <arnd@arndb.de>,
matthew@wil.cx, Jan Blunck <jblunck@suse.de>,
Steve French <smfrench@gmail.com>,
Steve French <sfrench@samba.org>
Subject: [PATCH 07/20] BKL: Remove BKL from CifsFS
Date: Wed, 18 Nov 2009 10:24:40 +0100 [thread overview]
Message-ID: <1258536293-7762-8-git-send-email-jblunck@suse.de> (raw)
In-Reply-To: <1258536293-7762-1-git-send-email-jblunck@suse.de>
The BKL is only used in put_super and fill_super that are both protected by
the superblocks s_umount rw_semaphore. Therefore it is safe to remove the
BKL entirely.
Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Steve French <smfrench@gmail.com>
---
fs/cifs/cifsfs.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 09ccb9d..137d1e8 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -35,7 +35,6 @@
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
-#include <linux/smp_lock.h>
#include "cifsfs.h"
#include "cifspdu.h"
#define DECLARE_GLOBALS_HERE
@@ -201,8 +200,6 @@ cifs_put_super(struct super_block *sb)
return;
}
- lock_kernel();
-
rc = cifs_umount(sb, cifs_sb);
if (rc)
cERROR(1, ("cifs_umount failed with return code %d", rc));
@@ -215,8 +212,6 @@ cifs_put_super(struct super_block *sb)
unload_nls(cifs_sb->local_nls);
kfree(cifs_sb);
-
- unlock_kernel();
}
static int
@@ -598,28 +593,22 @@ cifs_get_sb(struct file_system_type *fs_type,
int rc;
struct super_block *sb;
- lock_kernel();
-
sb = sget(fs_type, NULL, set_anon_super, NULL);
cFYI(1, ("Devname: %s flags: %d ", dev_name, flags));
- if (IS_ERR(sb)) {
- unlock_kernel();
+ if (IS_ERR(sb))
return PTR_ERR(sb);
- }
sb->s_flags = flags;
rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0);
if (rc) {
deactivate_locked_super(sb);
- unlock_kernel();
return rc;
}
sb->s_flags |= MS_ACTIVE;
simple_set_mnt(mnt, sb);
- unlock_kernel();
return 0;
}
--
1.6.4.2
next prev parent reply other threads:[~2009-11-18 9:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 9:24 [PATCH 00/20] BKL pushdown from do_new_mount() to the filesystems (v3) Jan Blunck
2009-11-18 9:24 ` [PATCH 01/20] JFS: Free sbi memory in error path Jan Blunck
2009-11-18 9:24 ` [PATCH 02/20] AFFS: " Jan Blunck
2009-11-18 9:24 ` [PATCH 04/20] BKL: Remove outdated comment and include Jan Blunck
2009-11-18 9:24 ` [PATCH 05/20] BKL: Remove BKL from Amiga FFS Jan Blunck
2009-11-18 9:24 ` [PATCH 06/20] BKL: Remove BKL from BFS Jan Blunck
2009-11-18 9:24 ` Jan Blunck [this message]
2009-11-18 9:24 ` [PATCH 08/20] BKL: Remove BKL from ext3 fill_super() Jan Blunck
2009-11-18 9:24 ` [PATCH 09/20] BKL: Remove BKL from ext3_put_super() and ext3_remount() Jan Blunck
2009-11-18 9:24 ` [PATCH 10/20] BKL: Remove BKL from ext4 filesystem Jan Blunck
2009-11-18 9:24 ` [PATCH 11/20] BKL: Remove BKL from exofs Jan Blunck
2009-11-18 9:24 ` [PATCH 12/20] BKL: Remove BKL from HFS Jan Blunck
2009-11-18 9:24 ` [PATCH 13/20] BKL: Remove BKL from HFS+ Jan Blunck
2009-11-18 9:24 ` [PATCH 14/20] BKL: Remove BKL from JFS Jan Blunck
2009-11-18 9:24 ` [PATCH 15/20] BKL: Remove BKL from NILFS2 Jan Blunck
2009-11-18 14:40 ` Ryusuke Konishi
2009-11-18 9:24 ` [PATCH 16/20] BKL: Remove BKL from NTFS Jan Blunck
2009-11-18 9:24 ` [PATCH 17/20] BKL: Remove BKL from cgroup Jan Blunck
2009-11-18 18:24 ` Paul Menage
2009-11-18 9:24 ` [PATCH 18/20] BKL: Remove BKL from do_new_mount() Jan Blunck
2009-11-18 9:24 ` [PATCH 19/20] ext2: Add ext2_sb_info s_lock spinlock Jan Blunck
2009-11-18 12:31 ` OGAWA Hirofumi
2009-11-18 9:24 ` [PATCH 20/20] BKL: Remove BKL from ext2 filesystem Jan Blunck
[not found] ` <1258536293-7762-4-git-send-email-jblunck@suse.de>
2009-11-18 10:41 ` [PATCH 03/20] BKL: Explicitly add BKL around get_sb/fill_super Anders Larsen
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=1258536293-7762-8-git-send-email-jblunck@suse.de \
--to=jblunck@suse.de \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=hch@infradead.org \
--cc=jkacur@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=sfrench@samba.org \
--cc=smfrench@gmail.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).