]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fuse: fix truncate after open
authorMiklos Szeredi <mszeredi@suse.cz>
Fri, 25 Feb 2011 13:44:58 +0000 (14:44 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Fri, 25 Feb 2011 13:44:58 +0000 (14:44 +0100)
Commit e1181ee6 "vfs: pass struct file to do_truncate on O_TRUNC
opens" broke the behavior of open(O_TRUNC|O_RDONLY) in fuse.  Fuse
assumed that when called from open, a truncate() will be done, not an
ftruncate().

Fix by restoring the old behavior, based on the ATTR_OPEN flag.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>

No differences found