mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <[email protected]> (finished the conversion) Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
794ee1baee
commit
1b1dcc1b57
113 changed files with 563 additions and 573 deletions
|
|
@ -149,7 +149,7 @@ ext2_iset_acl(struct inode *inode, struct posix_acl **i_acl,
|
|||
}
|
||||
|
||||
/*
|
||||
* inode->i_sem: don't care
|
||||
* inode->i_mutex: don't care
|
||||
*/
|
||||
static struct posix_acl *
|
||||
ext2_get_acl(struct inode *inode, int type)
|
||||
|
|
@ -211,7 +211,7 @@ ext2_get_acl(struct inode *inode, int type)
|
|||
}
|
||||
|
||||
/*
|
||||
* inode->i_sem: down
|
||||
* inode->i_mutex: down
|
||||
*/
|
||||
static int
|
||||
ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
|
||||
|
|
@ -301,8 +301,8 @@ ext2_permission(struct inode *inode, int mask, struct nameidata *nd)
|
|||
/*
|
||||
* Initialize the ACLs of a new inode. Called from ext2_new_inode.
|
||||
*
|
||||
* dir->i_sem: down
|
||||
* inode->i_sem: up (access to inode is still exclusive)
|
||||
* dir->i_mutex: down
|
||||
* inode->i_mutex: up (access to inode is still exclusive)
|
||||
*/
|
||||
int
|
||||
ext2_init_acl(struct inode *inode, struct inode *dir)
|
||||
|
|
@ -361,7 +361,7 @@ cleanup:
|
|||
* for directories) are added. There are no more bits available in the
|
||||
* file mode.
|
||||
*
|
||||
* inode->i_sem: down
|
||||
* inode->i_mutex: down
|
||||
*/
|
||||
int
|
||||
ext2_acl_chmod(struct inode *inode)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ struct ext2_inode_info {
|
|||
#ifdef CONFIG_EXT2_FS_XATTR
|
||||
/*
|
||||
* Extended attributes can be read independently of the main file
|
||||
* data. Taking i_sem even when reading would cause contention
|
||||
* data. Taking i_mutex even when reading would cause contention
|
||||
* between readers of EAs and writers of regular file data, so
|
||||
* instead we synchronize on xattr_sem when reading or changing
|
||||
* EAs.
|
||||
|
|
|
|||
|
|
@ -1152,7 +1152,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type,
|
|||
struct buffer_head tmp_bh;
|
||||
struct buffer_head *bh;
|
||||
|
||||
down(&inode->i_sem);
|
||||
mutex_lock(&inode->i_mutex);
|
||||
while (towrite > 0) {
|
||||
tocopy = sb->s_blocksize - offset < towrite ?
|
||||
sb->s_blocksize - offset : towrite;
|
||||
|
|
@ -1189,7 +1189,7 @@ out:
|
|||
inode->i_version++;
|
||||
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
mark_inode_dirty(inode);
|
||||
up(&inode->i_sem);
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
return len - towrite;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ cleanup:
|
|||
/*
|
||||
* Inode operation listxattr()
|
||||
*
|
||||
* dentry->d_inode->i_sem: don't care
|
||||
* dentry->d_inode->i_mutex: don't care
|
||||
*/
|
||||
ssize_t
|
||||
ext2_listxattr(struct dentry *dentry, char *buffer, size_t size)
|
||||
|
|
|
|||
Loading…
Reference in a new issue