Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fuse: Always flush the page cache before FOPEN_DIRECT_IO write

This was done as condition on direct_io_allow_mmap, but I believe
this is not right, as a file might be open two times - once with
write-back enabled another time with FOPEN_DIRECT_IO.

Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

authored by

Bernd Schubert and committed by
Miklos Szeredi
1ce120dc b359af82

+1 -1
+1 -1
fs/fuse/file.c
··· 1619 1619 if (!ia) 1620 1620 return -ENOMEM; 1621 1621 1622 - if (fopen_direct_io && fc->direct_io_allow_mmap) { 1622 + if (fopen_direct_io) { 1623 1623 res = filemap_write_and_wait_range(mapping, pos, pos + count - 1); 1624 1624 if (res) { 1625 1625 fuse_io_free(ia);