mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
UPSTREAM: ANDROID: fuse-bpf: Fix truncate
Maps would crash every second launch. This was caused by maps receiving an incorrect file size after truncate, then mapping the file. Bug: 215486645 Test: fuse_test + launch maps 100 times & look for native crashes Signed-off-by: Paul Lawrence <paullawrence@google.com> Change-Id: I13b0211330fb48592864ab53f8ffff60c19aab11
This commit is contained in:
parent
e8914c1be5
commit
d6120d0382
1 changed files with 3 additions and 0 deletions
|
|
@ -1738,6 +1738,9 @@ int fuse_setattr_backing(struct fuse_args *fa,
|
|||
inode_lock(d_inode(backing_path->dentry));
|
||||
res = notify_change(backing_path->dentry, &new_attr, NULL);
|
||||
inode_unlock(d_inode(backing_path->dentry));
|
||||
|
||||
if (res == 0 && (new_attr.ia_valid & ATTR_SIZE))
|
||||
i_size_write(dentry->d_inode, new_attr.ia_size);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue