linux/fs/fuse
Miklos Szeredi 902df9f02c fuse: atomic_o_trunc should truncate pagecache
commit df0e91d488 upstream.

Fuse has an "atomic_o_trunc" mode, where userspace filesystem uses the
O_TRUNC flag in the OPEN request to truncate the file atomically with the
open.

In this mode there's no need to send a SETATTR request to userspace after
the open, so fuse_do_setattr() checks this mode and returns.  But this
misses the important step of truncating the pagecache.

Add the missing parts of truncation to the ATTR_OPEN branch.

Reported-by: Chad Austin <chadaustin@fb.com>
Fixes: 6ff958edbf ("fuse: add atomic open+truncate support")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-11-20 18:04:46 +00:00
..
control.c fuse: add __exit to fuse_ctl_cleanup 2014-04-28 14:19:21 +02:00
cuse.c fuse: pull iov_iter initializations up 2014-05-06 17:32:51 -04:00
dev.c fuse: set stolen page uptodate 2015-03-30 11:10:41 +01:00
dir.c fuse: atomic_o_trunc should truncate pagecache 2018-11-20 18:04:46 +00:00
file.c mm: drop vm_ops->remap_pages and generic_file_remap_pages() stub 2018-10-03 04:09:51 +01:00
fuse_i.h fuse: Propagate dentry down to inode_change_ok() 2017-02-23 03:53:52 +00:00
inode.c fuse: fix wrong assignment of ->flags in fuse_send_init() 2016-11-20 01:17:01 +00:00
Kconfig fuse: Move CUSE Kconfig entry from fs/Kconfig into fs/fuse/Kconfig 2013-01-17 13:08:45 +01:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00