mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
ANDROID: Incremental fs: set the correct access to mapped files
Backing file needs to have write permissions for all users even though the mounted view doesn't - otherwise incfs can't change the internal file data. Bug: 180535478 Test: adb install <apk> Signed-off-by: Yurii Zubrytskyi <zyy@google.com> Signed-off-by: Paul Lawrence <paullawrence@google.com> Change-Id: I5d7915b28072cff1508ba45b56e844cb678ca466
This commit is contained in:
parent
0b62157672
commit
de43680982
|
|
@ -863,6 +863,12 @@ static long ioctl_create_mapped_file(struct file *file, void __user *arg)
|
|||
if (error)
|
||||
goto out;
|
||||
|
||||
error = chmod(file_dentry, args.mode | 0222);
|
||||
if (error) {
|
||||
pr_debug("incfs: chmod err: %d\n", error);
|
||||
goto delete_file;
|
||||
}
|
||||
|
||||
/* Save the file's size as an xattr for easy fetching in future. */
|
||||
size_attr_value = cpu_to_le64(args.size);
|
||||
error = vfs_setxattr(file_dentry, INCFS_XATTR_SIZE_NAME,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user