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: 47497 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1931159wrn; Mon, 23 Jan 2023 18:41:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXsqY9F0psS+OgOIxUG0qqXAyeBkU6+px+zu83D3hsm0KL/xmXFtie06lxvlEaFPJyQvUdii X-Received: by 2002:a17:906:ca59:b0:870:7e7d:97a3 with SMTP id jx25-20020a170906ca5900b008707e7d97a3mr26122670ejb.59.1674528103481; Mon, 23 Jan 2023 18:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674528103; cv=none; d=google.com; s=arc-20160816; b=BKJkmEF1rgnBDZcyjQbDVNNwa6OKiWuOqfKilQ2XDuu6qpuaCwVvuUHOyNkjnTymDZ F7VbgUEUofZ9hA8JzTDM+N+tU05JUnj+lL/KztnP5hV+R7YWqOJxfLm0rDSL8eQzO9yL jSRRetDolw93qrmoZ6fcSH4qvZPsQyMWXOzo7ukeJPO+TH+FnS7cOJb4tl30Ltx7Uph0 vR2LDyQLPNGE88Ycu/TuP4zKm8E0xD4bcnyPgZgvzR8NC4welvdE1zKjLyQOFnKtJJCJ uR/PsXWWP2iGu/ljdwlz/WHvlx61tAJf4HrmcCaLvscSs5iOpsdq2KGKJY3xCfGub4Bh 3pLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fQ1wIVJNt5DXLKBshV7W2ww1uzBSJEoD/iEzMJIiQpg=; b=kmH6kBVvX6oSQw6Dkd87ds6rWvIVwJaGaR5UAqrYiCb+LneX1lm+EzVoUhYriNH4eU RqgPwvLhdsEfZOEiCIYJWipmUe+wit0NuRH6IfzxkwpC6Uadv8KTJfm0kl22H3oOBtp0 C5k32hpewFjgfi/flycH45ollEAvOSXVESxzQFspG29bd2hjBNvlyfsq6b+tuUWNbPG+ +ezwnOD1T6IdEEA947oyvowGSOy5wC8NwiLCMxcXlwrwf+C8WwvCqI1IyVGlAWssmHE9 AuR8vRTgCSSmLfdSv2A2To0W6EPcRRY0VUwG6cfH+vLOvlTWJxaLgCX4l/0VuuhE5IXc nOQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QM9MKpOS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a170906220500b008695abff759si709779ejs.870.2023.01.23.18.41.20; Mon, 23 Jan 2023 18:41:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QM9MKpOS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232422AbjAXCjh (ORCPT + 99 others); Mon, 23 Jan 2023 21:39:37 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752596125201903162?= X-GMAIL-MSGID: =?utf-8?q?1755869980989664197?= 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: