mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ANDROID: fuse-bpf: Fix lseek return value for offset 0
Bug: 227160050 Test: audible app now works Signed-off-by: Paul Lawrence <paullawrence@google.com> Change-Id: Ib14765285190b5838f28c25a69c91935d02c34f4
This commit is contained in:
@@ -465,11 +465,15 @@ int fuse_lseek_backing(struct fuse_args *fa, struct file *file, loff_t offset, i
|
|||||||
|
|
||||||
/* TODO: Handle changing of the file handle */
|
/* TODO: Handle changing of the file handle */
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
if (whence == SEEK_CUR)
|
if (whence == SEEK_CUR) {
|
||||||
return file->f_pos;
|
flo->offset = file->f_pos;
|
||||||
|
return flo->offset;
|
||||||
|
}
|
||||||
|
|
||||||
if (whence == SEEK_SET)
|
if (whence == SEEK_SET) {
|
||||||
return vfs_setpos(file, 0, 0);
|
flo->offset = vfs_setpos(file, 0, 0);
|
||||||
|
return flo->offset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inode_lock(file->f_inode);
|
inode_lock(file->f_inode);
|
||||||
|
|||||||
Reference in New Issue
Block a user