Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c86674b authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi Committed by Sahil Sonar
Browse files

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: default avatarYurii Zubrytskyi <zyy@google.com>
Signed-off-by: default avatarPaul Lawrence <paullawrence@google.com>
Change-Id: Ie25ff62b5b78a2f1f52de68d9b39c3a9825af82b
parent 27c6c021
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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,