ANDROID: sdcardfs: Remove unnecessary lock
The mmap_sem lock does not appear to be protecting anything, and has been removed in Samsung's more recent versions of sdcardfs. Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: I76ff3e33002716b8384fc8be368028ed63dffe4e Bug: 63785372
This commit is contained in:
parent
2451d7f28d
commit
dedbddf5e4
1 changed files with 0 additions and 6 deletions
|
@ -776,13 +776,9 @@ static int sdcardfs_setattr(struct vfsmount *mnt, struct dentry *dentry, struct
|
||||||
* afterwards in the other cases: we fsstack_copy_inode_size from
|
* afterwards in the other cases: we fsstack_copy_inode_size from
|
||||||
* the lower level.
|
* the lower level.
|
||||||
*/
|
*/
|
||||||
if (current->mm)
|
|
||||||
down_write(¤t->mm->mmap_sem);
|
|
||||||
if (ia->ia_valid & ATTR_SIZE) {
|
if (ia->ia_valid & ATTR_SIZE) {
|
||||||
err = inode_newsize_ok(&tmp, ia->ia_size);
|
err = inode_newsize_ok(&tmp, ia->ia_size);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (current->mm)
|
|
||||||
up_write(¤t->mm->mmap_sem);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
truncate_setsize(inode, ia->ia_size);
|
truncate_setsize(inode, ia->ia_size);
|
||||||
|
@ -805,8 +801,6 @@ static int sdcardfs_setattr(struct vfsmount *mnt, struct dentry *dentry, struct
|
||||||
err = notify_change2(lower_mnt, lower_dentry, &lower_ia, /* note: lower_ia */
|
err = notify_change2(lower_mnt, lower_dentry, &lower_ia, /* note: lower_ia */
|
||||||
NULL);
|
NULL);
|
||||||
inode_unlock(d_inode(lower_dentry));
|
inode_unlock(d_inode(lower_dentry));
|
||||||
if (current->mm)
|
|
||||||
up_write(¤t->mm->mmap_sem);
|
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue