fuse: invalidate page cache pages before direct write
authorHao Xu <howeyxu@tencent.com>
Tue, 1 Aug 2023 08:06:45 +0000 (16:06 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 16 Aug 2023 10:20:37 +0000 (12:20 +0200)
commit80e4f25262f9f1a5f08154fafaa6ac4371043d35
tree7c26489425a478e5461ed04beb89ea86e3d7ca70
parentb8bd342d50cbf606666488488f9fea374aceb2d5
fuse: invalidate page cache pages before direct write

In FOPEN_DIRECT_IO, page cache may still be there for a file since private
mmap is allowed.  Direct write should respect that and invalidate the
corresponding pages so that page cache readers don't get stale data.

Signed-off-by: Hao Xu <howeyxu@tencent.com>
Tested-by: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c