diff options
author | Jan Blunck <jblunck@infradead.org> | 2010-02-24 07:25:29 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-04 15:10:36 -0400 |
commit | b0991aa324b57dca8feef75ed75b24080ee4a9fc (patch) | |
tree | 3d67c670002bc1efe0419ca2e927bc334c73be0c /fs/cifs/cifsfs.c | |
parent | ba13d597a60a1a26614f18b76c1a2cad1a548e46 (diff) |
BKL: Remove BKL from CifsFS
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@infradead.org>
Cc: Steve French <smfrench@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | 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 070bf1aecd2d..4e273f7793f6 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/kthread.h> | 36 | #include <linux/kthread.h> |
37 | #include <linux/freezer.h> | 37 | #include <linux/freezer.h> |
38 | #include <linux/smp_lock.h> | ||
39 | #include "cifsfs.h" | 38 | #include "cifsfs.h" |
40 | #include "cifspdu.h" | 39 | #include "cifspdu.h" |
41 | #define DECLARE_GLOBALS_HERE | 40 | #define DECLARE_GLOBALS_HERE |
@@ -200,8 +199,6 @@ cifs_put_super(struct super_block *sb) | |||
200 | return; | 199 | return; |
201 | } | 200 | } |
202 | 201 | ||
203 | lock_kernel(); | ||
204 | |||
205 | rc = cifs_umount(sb, cifs_sb); | 202 | rc = cifs_umount(sb, cifs_sb); |
206 | if (rc) | 203 | if (rc) |
207 | cERROR(1, "cifs_umount failed with return code %d", rc); | 204 | cERROR(1, "cifs_umount failed with return code %d", rc); |
@@ -215,8 +212,6 @@ cifs_put_super(struct super_block *sb) | |||
215 | unload_nls(cifs_sb->local_nls); | 212 | unload_nls(cifs_sb->local_nls); |
216 | bdi_destroy(&cifs_sb->bdi); | 213 | bdi_destroy(&cifs_sb->bdi); |
217 | kfree(cifs_sb); | 214 | kfree(cifs_sb); |
218 | |||
219 | unlock_kernel(); | ||
220 | } | 215 | } |
221 | 216 | ||
222 | static int | 217 | static int |
@@ -516,28 +511,22 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
516 | int rc; | 511 | int rc; |
517 | struct super_block *sb; | 512 | struct super_block *sb; |
518 | 513 | ||
519 | lock_kernel(); | ||
520 | |||
521 | sb = sget(fs_type, NULL, set_anon_super, NULL); | 514 | sb = sget(fs_type, NULL, set_anon_super, NULL); |
522 | 515 | ||
523 | cFYI(1, "Devname: %s flags: %d ", dev_name, flags); | 516 | cFYI(1, "Devname: %s flags: %d ", dev_name, flags); |
524 | 517 | ||
525 | if (IS_ERR(sb)) { | 518 | if (IS_ERR(sb)) |
526 | unlock_kernel(); | ||
527 | return PTR_ERR(sb); | 519 | return PTR_ERR(sb); |
528 | } | ||
529 | 520 | ||
530 | sb->s_flags = flags; | 521 | sb->s_flags = flags; |
531 | 522 | ||
532 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); | 523 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); |
533 | if (rc) { | 524 | if (rc) { |
534 | deactivate_locked_super(sb); | 525 | deactivate_locked_super(sb); |
535 | unlock_kernel(); | ||
536 | return rc; | 526 | return rc; |
537 | } | 527 | } |
538 | sb->s_flags |= MS_ACTIVE; | 528 | sb->s_flags |= MS_ACTIVE; |
539 | simple_set_mnt(mnt, sb); | 529 | simple_set_mnt(mnt, sb); |
540 | unlock_kernel(); | ||
541 | return 0; | 530 | return 0; |
542 | } | 531 | } |
543 | 532 | ||