From patchwork Tue Jan 24 02:38:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Van Hensbergen X-Patchwork-Id: 13113361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBCECC25B50 for ; Tue, 24 Jan 2023 02:39:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232149AbjAXCja (ORCPT ); Mon, 23 Jan 2023 21:39:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232390AbjAXCjX (ORCPT ); Mon, 23 Jan 2023 21:39:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9410E3346D; Mon, 23 Jan 2023 18:39:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 512C8B80F97; Tue, 24 Jan 2023 02:39:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3336AC433A7; Tue, 24 Jan 2023 02:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674527954; bh=Ok4fLl47ydowKVxThK8D575DI78XULsYZEvV5sQqQ3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QM9MKpOSh6OiNoRA4VtS6VKDgYN4katuG5qew4JF+Lwm5t23lbkWshm+aMORugO+8 kyvSaL090RAAALaxoMAlPTYjYRUAlgdT3NqO+0p7Jc7NhU1G5XuOjlFEgojmkZMlZu FdBLlDpBpdccuexoXuo87A5neL/dUJ6hG6AoI7PcMhDftIbwafcjUvgdAcvrIzwfxG TWdfYgP9g+57ZGw66wEyy8ja6WEXsUSYMrdOhGDik50Qb6cj8mVU9h2+eVz7CplJeA xCeRVntitFR+3lk3CJsTQmf0ulwEAFUe1hgNdDn3i8HP2W7ZuOo7j5UmslKQy+zC86 BzXcDjHlSySUQ== From: Eric Van Hensbergen To: v9fs-developer@lists.sourceforge.net, asmadeus@codewreck.org, rminnich@gmail.com, lucho@ionkov.net Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux_oss@crudebyte.com, Eric Van Hensbergen Subject: [PATCH v3 06/11] fix bug in client create for .L Date: Tue, 24 Jan 2023 02:38:29 +0000 Message-Id: <20230124023834.106339-7-ericvh@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230124023834.106339-1-ericvh@kernel.org> References: <20221218232217.1713283-1-evanhensbergen@icloud.com> <20230124023834.106339-1-ericvh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 --- net/9p/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/9p/client.c b/net/9p/client.c index 6c2a768a6ab1..2adcb5e7b0e2 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -1293,7 +1293,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: