Skip to content

Commit b0991aa

Browse files
jblunckarndb
authored andcommitted
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>
1 parent ba13d59 commit b0991aa

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎fs/cifs/cifsfs.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include <linux/delay.h>
3636
#include <linux/kthread.h>
3737
#include <linux/freezer.h>
38-
#include <linux/smp_lock.h>
3938
#include "cifsfs.h"
4039
#include "cifspdu.h"
4140
#define DECLARE_GLOBALS_HERE
@@ -200,8 +199,6 @@ cifs_put_super(struct super_block *sb)
200199
return;
201200
}
202201

203-
lock_kernel();
204-
205202
rc = cifs_umount(sb, cifs_sb);
206203
if (rc)
207204
cERROR(1, "cifs_umount failed with return code %d", rc);
@@ -215,8 +212,6 @@ cifs_put_super(struct super_block *sb)
215212
unload_nls(cifs_sb->local_nls);
216213
bdi_destroy(&cifs_sb->bdi);
217214
kfree(cifs_sb);
218-
219-
unlock_kernel();
220215
}
221216

222217
static int
@@ -516,28 +511,22 @@ cifs_get_sb(struct file_system_type *fs_type,
516511
int rc;
517512
struct super_block *sb;
518513

519-
lock_kernel();
520-
521514
sb = sget(fs_type, NULL, set_anon_super, NULL);
522515

523516
cFYI(1, "Devname: %s flags: %d ", dev_name, flags);
524517

525-
if (IS_ERR(sb)) {
526-
unlock_kernel();
518+
if (IS_ERR(sb))
527519
return PTR_ERR(sb);
528-
}
529520

530521
sb->s_flags = flags;
531522

532523
rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0);
533524
if (rc) {
534525
deactivate_locked_super(sb);
535-
unlock_kernel();
536526
return rc;
537527
}
538528
sb->s_flags |= MS_ACTIVE;
539529
simple_set_mnt(mnt, sb);
540-
unlock_kernel();
541530
return 0;
542531
}
543532

0 commit comments

Comments
 (0)