From: Eric Van Hensbergen Date: Sun, 18 Dec 2022 17:57:27 +0000 (+0000) Subject: net/9p: fix bug in client create for .L X-Git-Tag: v6.1.21~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f7c09f642892552beb14059b2f35c9a2f7f7e9c;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Dominique Martinet Signed-off-by: Sasha Levin --- diff --git a/net/9p/client.c b/net/9p/client.c index 554a4b1..af59c3f 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: