diff options
author | Joakim Sindholt <opensource@zhasha.com> | 2024-03-18 12:22:33 +0100 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@kernel.org> | 2024-03-28 15:10:28 +0000 |
commit | 87de39e70503e04ddb58965520b15eb9efa7eef3 (patch) | |
tree | a3e238f1679794df4a84c0cb7652c358a15c8a79 /fs/9p | |
parent | cd25e15e57e68a6b18dc9323047fe9c68b99290b (diff) | |
download | lwn-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.c | 3 |
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; |