commit | 8d56addd70c7c0626502569e22cc8fce49ae39f5 | [log] [tgz] |
---|---|---|
author | Miklos Szeredi <mszeredi@suse.cz> | Fri Feb 25 14:44:58 2011 +0100 |
committer | Miklos Szeredi <mszeredi@suse.cz> | Fri Feb 25 14:44:58 2011 +0100 |
tree | 43e5e51dfa7a1b7e566cb235d44d5991e0c806d0 | |
parent | 5a18ec176c934ca1bc9dc61580a5e0e90a9b5733 [diff] |
fuse: fix truncate after open 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>