[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240423110318.1659628-2-sashal@kernel.org>
Date: Tue, 23 Apr 2024 07:03:12 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Joakim Sindholt <opensource@...sha.com>,
Eric Van Hensbergen <ericvh@...nel.org>,
Sasha Levin <sashal@...nel.org>,
lucho@...kov.net,
asmadeus@...ewreck.org,
v9fs@...ts.linux.dev
Subject: [PATCH AUTOSEL 4.19 2/7] fs/9p: translate O_TRUNC into OTRUNC
From: Joakim Sindholt <opensource@...sha.com>
[ 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@...sha.com>
Signed-off-by: Eric Van Hensbergen <ericvh@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
fs/9p/vfs_inode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index d1a0f36dcdd43..ea32af83729d9 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;
--
2.43.0
Powered by blists - more mailing lists