mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
f5412be599
commit
4688a066ec
4 changed files with 1 additions and 25 deletions
|
@ -7,7 +7,6 @@
|
|||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/writeback.h>
|
||||
#include "adfs.h"
|
||||
|
@ -316,8 +315,6 @@ adfs_notify_change(struct dentry *dentry, struct iattr *attr)
|
|||
unsigned int ia_valid = attr->ia_valid;
|
||||
int error;
|
||||
|
||||
lock_kernel();
|
||||
|
||||
error = inode_change_ok(inode, attr);
|
||||
|
||||
/*
|
||||
|
@ -359,7 +356,6 @@ adfs_notify_change(struct dentry *dentry, struct iattr *attr)
|
|||
if (ia_valid & (ATTR_SIZE | ATTR_MTIME | ATTR_MODE))
|
||||
mark_inode_dirty(inode);
|
||||
out:
|
||||
unlock_kernel();
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -374,7 +370,6 @@ int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
|||
struct object_info obj;
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
obj.file_id = inode->i_ino;
|
||||
obj.name_len = 0;
|
||||
obj.parent_id = ADFS_I(inode)->parent_id;
|
||||
|
@ -384,6 +379,5 @@ int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
|||
obj.size = inode->i_size;
|
||||
|
||||
ret = adfs_dir_update(sb, &obj, wbc->sync_mode == WB_SYNC_ALL);
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue