summary refs log tree commit diff
path: root/net
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@kernel.org>2022-12-18 17:57:27 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-22 13:33:54 +0100
commit3f7c09f642892552beb14059b2f35c9a2f7f7e9c (patch)
treead6361445fa4eb639cf46d991d05ebed86e0cebb /net
parentd9923e7214a870b312bf61f6a89c7554d0966985 (diff)
downloadlinux-3f7c09f642892552beb14059b2f35c9a2f7f7e9c.tar.gz
net/9p: fix bug in client create for .L
[ Upstream commit 3866584a1c56a2bbc8c0981deb4476d0b801969e ]

We are supposed to set fid->mode to reflect the flags
that were used to open the file.  We were actually setting
it to the creation mode which is the default perms of the
file not the flags the file was opened with.

Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 554a4b11f4fe..af59c3f2ec2e 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1284,7 +1284,7 @@ int p9_client_create_dotl(struct p9_fid *ofid, const char *name, u32 flags,
 		 qid->type, qid->path, qid->version, iounit);
 
 	memmove(&ofid->qid, qid, sizeof(struct p9_qid));
-	ofid->mode = mode;
+	ofid->mode = flags;
 	ofid->iounit = iounit;
 
 free_and_error: