Re: [PATCH v8 9/9] erofs: implement .fadvise for page cache share
From: Gao Xiang
Date: Sun Nov 16 2025 - 22:49:04 EST
On 2025/11/14 17:55, Hongbo Li wrote:
From: Hongzhen Luo <hongzhen@xxxxxxxxxxxxxxxxx>
This patch implements the .fadvise interface for page cache share.
Similar to overlayfs, it drops those clean, unused pages through
vfs_fadvise().
Signed-off-by: Hongzhen Luo <hongzhen@xxxxxxxxxxxxxxxxx>
Signed-off-by: Hongbo Li <lihongbo22@xxxxxxxxxx>
---
fs/erofs/ishare.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/fs/erofs/ishare.c b/fs/erofs/ishare.c
index 14b2690055c5..88c4af3f8993 100644
--- a/fs/erofs/ishare.c
+++ b/fs/erofs/ishare.c
@@ -239,6 +239,16 @@ static int erofs_ishare_mmap(struct file *file, struct vm_area_struct *vma)
return generic_file_readonly_mmap(file, vma);
}
+static int erofs_ishare_fadvice(struct file *file, loff_t offset,
+ loff_t len, int advice)
s/fadvice/fadvise/
Otherwise it looks good to me,
Reviewed-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
Thanks,
Gao Xiang