summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode_dotl.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2013-02-05 06:56:28 +0100
committerEric Van Hensbergen <ericvh@gmail.com>2013-02-10 23:29:47 +0100
commit03f0e022736d123bc42907a958535f4f10d0c4c3 (patch)
tree05ae373874c365c4f71b709a412e1fcafd58ec76 /fs/9p/vfs_inode_dotl.c
parentlocking in fs/9p ->readdir() (diff)
downloadlinux-03f0e022736d123bc42907a958535f4f10d0c4c3.tar.xz
linux-03f0e022736d123bc42907a958535f4f10d0c4c3.zip
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_inode_dotl.c')
-rw-r--r--fs/9p/vfs_inode_dotl.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 40895546e103..edd41d918e6c 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -186,7 +186,6 @@ static int v9fs_mapped_dotl_flags(int flags)
{ O_CREAT, P9_DOTL_CREATE },
{ O_EXCL, P9_DOTL_EXCL },
{ O_NOCTTY, P9_DOTL_NOCTTY },
- { O_TRUNC, P9_DOTL_TRUNC },
{ O_APPEND, P9_DOTL_APPEND },
{ O_NONBLOCK, P9_DOTL_NONBLOCK },
{ O_DSYNC, P9_DOTL_DSYNC },