mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +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 */
|
||||
if (offset == 0) {
|
||||
if (whence == SEEK_CUR)
|
||||
return file->f_pos;
|
||||
if (whence == SEEK_CUR) {
|
||||
flo->offset = file->f_pos;
|
||||
return flo->offset;
|
||||
}
|
||||
|
||||
if (whence == SEEK_SET)
|
||||
return vfs_setpos(file, 0, 0);
|
||||
if (whence == SEEK_SET) {
|
||||
flo->offset = vfs_setpos(file, 0, 0);
|
||||
return flo->offset;
|
||||
}
|
||||
}
|
||||
|
||||
inode_lock(file->f_inode);
|
||||
|
||||
Reference in New Issue
Block a user