mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
BACKPORT: ANDROID: fuse-bpf: Ignore readaheads unless they go to the daemon
readpages will be triggered on the fuse fs in passthrough mode though system calls like fadvise. If the daemon isn't aware of the file, this will likely cause a hang. For the moment, simply ignore fadvise in this situation Bug: 301201239 Test: fuse_test, atest ScopedStorageDeviceTest both pass Signed-off-by: Paul Lawrence <paullawrence@google.com> (cherry picked from https://android-review.googlesource.com/q/commit:ac9071df3ba6715219a16a44d4711f041b0c25de) Merged-In: I524a84aeeb1b1593e51264fcc37f7cfa66757168 Change-Id: I524a84aeeb1b1593e51264fcc37f7cfa66757168
This commit is contained in:
parent
3ab55eae01
commit
fa625f8622
1 changed files with 13 additions and 0 deletions
|
|
@ -1033,6 +1033,19 @@ static int fuse_readpages_fill(void *_data, struct page *page)
|
|||
struct inode *inode = data->inode;
|
||||
struct fuse_conn *fc = get_fuse_conn(inode);
|
||||
|
||||
#ifdef CONFIG_FUSE_BPF
|
||||
/*
|
||||
* Currently no meaningful readahead is possible with fuse-bpf within
|
||||
* the kernel, so unless the daemon is aware of this file, ignore this
|
||||
* call.
|
||||
*/
|
||||
if (!get_fuse_inode(inode)->nodeid)
|
||||
return -EIO;
|
||||
#endif
|
||||
|
||||
if (fuse_is_bad(inode))
|
||||
return -EIO;
|
||||
|
||||
fuse_wait_on_page_writeback(inode, page->index);
|
||||
|
||||
if (ap->num_pages &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue