This is a note to let you know that I've just added the patch titled fs/9p: translate O_TRUNC into OTRUNC to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: fs-9p-translate-o_trunc-into-otrunc.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 9c8d37b6d1dd8ca67faf942d4443fae79622f478 Author: Joakim Sindholt <opensource@xxxxxxxxxx> Date: Mon Mar 18 12:22:33 2024 +0100 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@xxxxxxxxxx> Signed-off-by: Eric Van Hensbergen <ericvh@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index a0c5a372dcf62..8f287009545c9 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -181,6 +181,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;