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 78690C05027 for ; Sat, 18 Feb 2023 00:41:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbjBRAlY (ORCPT ); Fri, 17 Feb 2023 19:41:24 -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 ); 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 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 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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: -- 2.37.2