summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorJoakim Sindholt <opensource@zhasha.com>2024-03-18 12:22:33 +0100
committerEric Van Hensbergen <ericvh@kernel.org>2024-03-28 15:10:28 +0000
commit87de39e70503e04ddb58965520b15eb9efa7eef3 (patch)
treea3e238f1679794df4a84c0cb7652c358a15c8a79 /fs/9p
parentcd25e15e57e68a6b18dc9323047fe9c68b99290b (diff)
downloadlwn-87de39e70503e04ddb58965520b15eb9efa7eef3.tar.gz
lwn-87de39e70503e04ddb58965520b15eb9efa7eef3.zip
fs/9p: translate O_TRUNC into OTRUNC
This one hits both 9P2000 and .u as it appears v9fs has never translated the O_TRUNC flag. Signed-off-by: Joakim Sindholt <opensource@zhasha.com> Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 9612fdb563a3..c5b4d3631c47 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -178,6 +178,9 @@ int v9fs_uflags2omode(int uflags, int extended)
break;
}
+ if (uflags & O_TRUNC)
+ ret |= P9_OTRUNC;
+
if (extended) {
if (uflags & O_EXCL)
ret |= P9_OEXCL;