OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24c96f7
)
staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
author
zhangshuxiao
<zhangshuxiao@xiaomi.com>
Wed, 8 Mar 2017 08:53:24 +0000
(16:53 +0800)
committer
Greg Kroah-Hartman
<gregkh@google.com>
Mon, 10 Apr 2017 14:07:10 +0000
(14:07 +0000)
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>
drivers/staging/android/ashmem.c
patch
|
blob
|
history
diff --git
a/drivers/staging/android/ashmem.c
b/drivers/staging/android/ashmem.c
index
3f11332
..
e4530ac
100644
(file)
--- a/
drivers/staging/android/ashmem.c
+++ b/
drivers/staging/android/ashmem.c
@@
-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);