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

Commit b8b8c5af authored by zhangshuxiao's avatar zhangshuxiao Committed by Greg Kroah-Hartman
Browse files

staging: android: ashmem: lseek failed due to no FMODE_LSEEK.



vfs_llseek will check whether the file mode has
FMODE_LSEEK, no return failure. But ashmem can be
lseek, so add FMODE_LSEEK to ashmem file.

Change-Id: Ia78ef4c7c96adb89d52e70b63f7c00636fe60d01
Signed-off-by: default avatarzhangshuxiao <zhangshuxiao@xiaomi.com>
(cherry picked from commit 6c8d409129bbebe36cde9f8e511011756216163a)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 68565811
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -405,6 +405,7 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
			ret = PTR_ERR(vmfile);
			goto out;
		}
		vmfile->f_mode |= FMODE_LSEEK;
		asma->file = vmfile;
	}
	get_file(asma->file);