]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/9p: fix bug in client create for .L
authorEric Van Hensbergen <ericvh@kernel.org>
Sun, 18 Dec 2022 17:57:27 +0000 (17:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:54 +0000 (13:33 +0100)
[ 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 <ericvh@kernel.org>
Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/9p/client.c

index 554a4b11f4fecc8b3e36ff4d49d11e125d49c297..af59c3f2ec2e70a521618d33cb071cd026ef1c9d 100644 (file)
@@ -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: