Skip to content
Snippets Groups Projects
Commit 09335c69 authored by Joakim Sindholt's avatar Joakim Sindholt Committed by Greg Kroah-Hartman
Browse files

fs/9p: translate O_TRUNC into OTRUNC


[ Upstream commit 87de39e7 ]

This one hits both 9P2000 and .u as it appears v9fs has never translated
the O_TRUNC flag.

Signed-off-by: default avatarJoakim Sindholt <opensource@zhasha.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent df1962a1
No related branches found
No related tags found
2 merge requests!186🤖 Sync Bot: Update v5.4-ktn to Latest Stable Kernel (v5.4.290),!174🤖 Sync Bot: Update v5.4-ktn to Latest Stable Kernel (v5.4.286)
...@@ -177,6 +177,9 @@ int v9fs_uflags2omode(int uflags, int extended) ...@@ -177,6 +177,9 @@ int v9fs_uflags2omode(int uflags, int extended)
break; break;
} }
if (uflags & O_TRUNC)
ret |= P9_OTRUNC;
if (extended) { if (extended) {
if (uflags & O_EXCL) if (uflags & O_EXCL)
ret |= P9_OEXCL; ret |= P9_OEXCL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment