diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-02-05 09:56:28 +0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2013-02-11 02:29:47 +0400 |
commit | 03f0e022736d123bc42907a958535f4f10d0c4c3 (patch) | |
tree | 05ae373874c365c4f71b709a412e1fcafd58ec76 /fs/9p/vfs_file.c | |
parent | 7ffdea7ea36cd1efebab65d1b221f05deaab00cd (diff) | |
download | linux-03f0e022736d123bc42907a958535f4f10d0c4c3.tar.xz |
fs/9p: Don't use O_TRUNC flag in TOPEN and TLOPEN request
We do the truncate via setattr request, hence don't pass the O_TRUNC flag in
open request. Without this patch we end up sending zero sized write request
to server when we try to truncate. Some servers (VirtFS) were not handling that
properly.
Reported-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_file.c')
-rw-r--r-- | fs/9p/vfs_file.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index c2483e97beee..7a3399767570 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -80,10 +80,6 @@ int v9fs_file_open(struct inode *inode, struct file *file) p9_client_clunk(fid); return err; } - if (file->f_flags & O_TRUNC) { - i_size_write(inode, 0); - inode->i_blocks = 0; - } if ((file->f_flags & O_APPEND) && (!v9fs_proto_dotu(v9ses) && !v9fs_proto_dotl(v9ses))) generic_file_llseek(file, 0, SEEK_END); |