Message ID | 20230218003323.2322580-7-ericvh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp148354wrn; Fri, 17 Feb 2023 16:49:21 -0800 (PST) X-Google-Smtp-Source: AK7set991aWFQSEKrAsRU3IbEvhTzxFoChCb+YOKh82E8nyD7RZlr/r0ox9jMLqlhdql+ADQIfIB X-Received: by 2002:a05:6a20:7d8a:b0:af:7233:5bfc with SMTP id v10-20020a056a207d8a00b000af72335bfcmr8115155pzj.8.1676681361202; Fri, 17 Feb 2023 16:49:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676681361; cv=none; d=google.com; s=arc-20160816; b=FH/qrT1XPt2SyuM2ReBwxmDyNw7ZzztUS842TgofoMYD6XSI+3UnHUGVoQMyCR9R5o 010Clee23fTgVKd4nGSFymResUQWOAizwR0gMnO07OwvXpbLb/15WY1hEkNV4NcVWWlx QHHv2T6wxiPkQeHkbz2LH7bYOdsSo5Z+y7dlG5BJRJLaXDCY7iUR+yaOmpwhFh/wTxh5 G1cN98o+bCIBq34bSWhiRELrfRTQhbl7ImOl4xSwwAv7bg4dY9UHxScC1VCPl3YR3GLM uPANr3lKRICj5Ox9nQOAFZVuiVLjJarc3qG1XNfJFx1PWdjE86bFOMh+MdKgOyabn3hd qIFg== 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=bL430gJmvcpwjZj84R+HSAU8n4QCLd4Qj9jeU4CBuokJ6GZSybu5YTa4/flp32fqXv EnFaaTHjsgW8Rty39DqMRbc83JVKpwzZIEd/bkX6RfESHn6PlMvOP0nDVX4bKTPFv0pI 6Ak6xB70LUrBSq7b06Bl7J9n0fxx0CuLOkwAUHtt0Z2EGuCIiDZYK98PSX3Nr9pu1v9p p//mgCQjJmzjll9X92uzFlkegTVb/OgHgUcpbq/UAZnrvQM42ZV/IJdzVlHvT1VMktG7 2HYGx3QEJ/YlalP6M3Wzz3VCO3/404ooDO3auXCMswEweJBaPIjyDPs4QgL8gRZX2L1Q 8eVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ca0eOXl9; 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 i15-20020a633c4f000000b004d39932df65si6512795pgn.585.2023.02.17.16.49.08; Fri, 17 Feb 2023 16:49:21 -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=Ca0eOXl9; 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 S229897AbjBRAlX (ORCPT <rfc822;daweilics@gmail.com> + 99 others); Fri, 17 Feb 2023 19:41:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjBRAlV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Feb 2023 19:41:21 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 043616D245; Fri, 17 Feb 2023 16:40:42 -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 4E242B82EB3; Sat, 18 Feb 2023 00:34:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5136AC433EF; Sat, 18 Feb 2023 00:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676680440; bh=Ok4fLl47ydowKVxThK8D575DI78XULsYZEvV5sQqQ3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ca0eOXl9ADJhsTGTNxOb4mqO6T2bOzENafCVhVAm0mc7ONXbnuaPYU4OAjdctPxYr PUo1IhvajR87EijDJTzX5g0oyLby1fPOxQCK1LLzQ8rGhDkD/uNKawSj1QTf5rqFJ6 F6mvmr32jGwLhcDR0laMVj5xemgb0Eakz5y0vZjaNyROYFV6vho8H3FhFJ3B8H4eFV E3CfKi4Z1mmtBNAfXEfv3iT6OqevRcyCRHUjcsZgxucBOoAEJKeXS+cq0cvwWFKYiu U9BFA32XpUCxRjDCchHpdIKUxb+xC9llr2zVITdTbqaafSWtqPCoX59XT5oWGUh5Ps z5Mi5F8D5jXNA== From: Eric Van Hensbergen <ericvh@kernel.org> 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 <ericvh@kernel.org> Subject: [PATCH v4 06/11] net/9p: fix bug in client create for .L Date: Sat, 18 Feb 2023 00:33:18 +0000 Message-Id: <20230218003323.2322580-7-ericvh@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230218003323.2322580-1-ericvh@kernel.org> References: <20230124023834.106339-1-ericvh@kernel.org> <20230218003323.2322580-1-ericvh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758127834813727092?= X-GMAIL-MSGID: =?utf-8?q?1758127834813727092?= |
Series |
Performance fixes for 9p filesystem
|
|
Commit Message
Eric Van Hensbergen
Feb. 18, 2023, 12:33 a.m. UTC
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>
---
net/9p/client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Eric Van Hensbergen wrote on Sat, Feb 18, 2023 at 12:33:18AM +0000: > 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> I was about to say fcreate has the same problem, but TCREATE's mode actually is the open mode (0 (called OREAD), 1 (OWRITE), 2 (ORDWR), and 3 (OEXEC)) and dotl's create is called perm :| I guess that's where the mistake came from... Good catch! (and there's also p9_wstat's mode which also is the perms to make things more confusing...) Anyway, Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
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: