diff options
author | Joakim Sindholt <opensource@zhasha.com> | 2024-03-18 14:22:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-17 12:42:41 +0300 |
commit | 0ce2676013818e62b18504d39211b65d8b54bc24 (patch) | |
tree | 54865fff4b83680351708c978fd37f1533a133da | |
parent | e90bc596a74bb905e0a45bf346038c3f9d1e868d (diff) | |
download | linux-0ce2676013818e62b18504d39211b65d8b54bc24.tar.xz |
fs/9p: translate O_TRUNC into OTRUNC
[ Upstream commit 87de39e70503e04ddb58965520b15eb9efa7eef3 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 d1a0f36dcdd4..ea32af83729d 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -192,6 +192,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; |