Skip to content

Commit

Permalink
net/9p: fix bug in client create for .L
Browse files Browse the repository at this point in the history
[ Upstream commit 3866584 ]

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>
  • Loading branch information
ericvh authored and gregkh committed Mar 22, 2023
1 parent 61f306f commit d5ae28a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,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:
Expand Down

0 comments on commit d5ae28a

Please sign in to comment.