mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
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: zhangshuxiao <zhangshuxiao@xiaomi.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
24c96f7836
commit
6c8d409129
@@ -392,6 +392,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);
|
||||
|
||||
Reference in New Issue
Block a user