Skip to content

Commit 77f2fe0

Browse files
committed
BKL: Remove BKL from afs
The BKL is only used in put_super and fill_super, which are both protected by the superblocks s_umount rw_semaphore. Therefore it is safe to remove the BKL entirely. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: linux-afs@lists.infradead.org Cc: David Howells <dhowells@redhat.com>
1 parent cdbd2b0 commit 77f2fe0

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎fs/afs/super.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <linux/mount.h>
2020
#include <linux/init.h>
2121
#include <linux/slab.h>
22-
#include <linux/smp_lock.h>
2322
#include <linux/fs.h>
2423
#include <linux/pagemap.h>
2524
#include <linux/parser.h>
@@ -302,15 +301,12 @@ static int afs_fill_super(struct super_block *sb, void *data)
302301
struct inode *inode = NULL;
303302
int ret;
304303

305-
lock_kernel();
306-
307304
_enter("");
308305

309306
/* allocate a superblock info record */
310307
as = kzalloc(sizeof(struct afs_super_info), GFP_KERNEL);
311308
if (!as) {
312309
_leave(" = -ENOMEM");
313-
unlock_kernel();
314310
return -ENOMEM;
315311
}
316312

@@ -344,7 +340,6 @@ static int afs_fill_super(struct super_block *sb, void *data)
344340
sb->s_root = root;
345341

346342
_leave(" = 0");
347-
unlock_kernel();
348343
return 0;
349344

350345
error_inode:
@@ -358,7 +353,6 @@ static int afs_fill_super(struct super_block *sb, void *data)
358353
sb->s_fs_info = NULL;
359354

360355
_leave(" = %d", ret);
361-
unlock_kernel();
362356
return ret;
363357
}
364358

@@ -458,12 +452,8 @@ static void afs_put_super(struct super_block *sb)
458452

459453
_enter("");
460454

461-
lock_kernel();
462-
463455
afs_put_volume(as->volume);
464456

465-
unlock_kernel();
466-
467457
_leave("");
468458
}
469459

0 commit comments

Comments
 (0)