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: baikal/mips/sdk6.1~92 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=e4cc7f1d2c29e69d13525ac88a90651d0b6708bb;p=kernel.git net/9p: fix bug in client create for .L [ Upstream commit b4019a2ccf4595e01c9c79d79f345f0dcccc25db ] 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 554a4b11f4fec..af59c3f2ec2e7 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: