linux/fs/fuse
Ken Sumrall ca20422682 fuse: fix attributes after open(O_TRUNC)
commit a0822c5577 upstream.

The attribute cache for a file was not being cleared when a file is opened
with O_TRUNC.

If the filesystem's open operation truncates the file ("atomic_o_trunc"
feature flag is set) then the kernel should invalidate the cached st_mtime
and st_ctime attributes.

Also i_size should be explicitly be set to zero as it is used sometimes
without refreshing the cache.

Signed-off-by: Ken Sumrall <ksumrall@android.com>
Cc: Anfei <anfei.zhou@gmail.com>
Cc: "Anand V. Avati" <avati@gluster.com>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 13:27:00 -08:00
..
control.c fuse: add fusectl interface to max_background 2009-09-16 14:15:29 +02:00
cuse.c CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00
dev.c fuse: flush background queue on connection close 2010-09-20 13:17:46 -07:00
dir.c fuse: reject O_DIRECT flag also in fuse_create 2009-11-27 16:37:13 +01:00
file.c fuse: fix attributes after open(O_TRUNC) 2010-12-09 13:27:00 -08:00
fuse_i.h truncate: use new helpers 2009-09-24 08:41:47 -04:00
inode.c truncate: use new helpers 2009-09-24 08:41:47 -04:00
Kconfig fs/Kconfig: move fuse out 2009-01-22 13:15:55 +03:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00