adfs: remove the big kernel lock

According to Russell King, adfs was written to not require the big
kernel lock, and all inode updates are done under adfs_dir_lock.

All other metadata in adfs is read-only and does not require locking.
The use of the BKL is the result of various pushdowns from the VFS
operations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Stuart Swales <stuart.swales.croftnuisk@gmail.com>
This commit is contained in:
Arnd Bergmann
2011-01-22 20:05:05 +01:00
parent f5412be599
commit 4688a066ec
4 changed files with 1 additions and 25 deletions

View File

@@ -9,7 +9,6 @@
*
* Common directory handling for ADFS
*/
#include <linux/smp_lock.h>
#include "adfs.h"
/*
@@ -27,8 +26,6 @@ adfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct adfs_dir dir;
int ret = 0;
lock_kernel();
if (filp->f_pos >> 32)
goto out;
@@ -70,7 +67,6 @@ free_out:
ops->free(&dir);
out:
unlock_kernel();
return ret;
}
@@ -276,7 +272,6 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
struct object_info obj;
int error;
lock_kernel();
error = adfs_dir_lookup_byname(dir, &dentry->d_name, &obj);
if (error == 0) {
error = -EACCES;
@@ -288,7 +283,6 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
if (inode)
error = 0;
}
unlock_kernel();
d_add(dentry, inode);
return ERR_PTR(error);
}