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>
This commit is contained in:
parent
cdbd2b013d
commit
77f2fe036c
|
@ -19,7 +19,6 @@
|
||||||
#include <linux/mount.h>
|
#include <linux/mount.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/pagemap.h>
|
#include <linux/pagemap.h>
|
||||||
#include <linux/parser.h>
|
#include <linux/parser.h>
|
||||||
|
@ -302,15 +301,12 @@ static int afs_fill_super(struct super_block *sb, void *data)
|
||||||
struct inode *inode = NULL;
|
struct inode *inode = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
|
|
||||||
_enter("");
|
_enter("");
|
||||||
|
|
||||||
/* allocate a superblock info record */
|
/* allocate a superblock info record */
|
||||||
as = kzalloc(sizeof(struct afs_super_info), GFP_KERNEL);
|
as = kzalloc(sizeof(struct afs_super_info), GFP_KERNEL);
|
||||||
if (!as) {
|
if (!as) {
|
||||||
_leave(" = -ENOMEM");
|
_leave(" = -ENOMEM");
|
||||||
unlock_kernel();
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +340,6 @@ static int afs_fill_super(struct super_block *sb, void *data)
|
||||||
sb->s_root = root;
|
sb->s_root = root;
|
||||||
|
|
||||||
_leave(" = 0");
|
_leave(" = 0");
|
||||||
unlock_kernel();
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_inode:
|
error_inode:
|
||||||
|
@ -358,7 +353,6 @@ error:
|
||||||
sb->s_fs_info = NULL;
|
sb->s_fs_info = NULL;
|
||||||
|
|
||||||
_leave(" = %d", ret);
|
_leave(" = %d", ret);
|
||||||
unlock_kernel();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,12 +452,8 @@ static void afs_put_super(struct super_block *sb)
|
||||||
|
|
||||||
_enter("");
|
_enter("");
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
|
|
||||||
afs_put_volume(as->volume);
|
afs_put_volume(as->volume);
|
||||||
|
|
||||||
unlock_kernel();
|
|
||||||
|
|
||||||
_leave("");
|
_leave("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue