summaryrefslogtreecommitdiffstats
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 16:10:28 +0100
commit87de39e70503e04ddb58965520b15eb9efa7eef3 (patch)
treea3e238f1679794df4a84c0cb7652c358a15c8a79 /fs/9p
parentfs/9p: only translate RWX permissions for plain 9P2000 (diff)
downloadlinux-87de39e70503e04ddb58965520b15eb9efa7eef3.tar.xz
linux-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;