From patchwork Tue Jul 18 20:50:16 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: 13317682 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E9D8101ED for ; Tue, 18 Jul 2023 20:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAA3BC433C7; Tue, 18 Jul 2023 20:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689713423; bh=U1llKZN9bzeNrf4u+gdKJoyKutM3P61zdD1PaebvrKY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mv1be18MbNRPYlwTJtC4FF7ZDNN9ZlxlX/kc4sR1PALY9hqAmPATw+pir6oYNSOGH iAkvo4d5tsqnzUYwc0XNlyN/jTyzsL1FvDa/GronlzxMce97cPrH/PmifKEqruIi5B 6bgXHdaFCmKh5m0Kl8T3JUUEQjR6kJ/JV3UakLH/DlObqOqF+oeMTOPSIU/9+uDRM2 ka09uqYajkzCypQzi4QVIadTRnH7B6zRPLDO2FnD4Sh6sqFRCyxJIWBy7HlrP44XOS 5t1HVJJYmD5GGW8RA52JTlmLk7NTz4cI8c/cTjbvkUEczIPp/MMUjmVgvb4zT/BIn1 +vBViqzS/fkhg== From: Eric Van Hensbergen Date: Tue, 18 Jul 2023 20:50:16 +0000 Subject: [PATCH v2 2/4] fs/9p: fix typo in comparison logic for cache mode Precedence: bulk X-Mailing-List: v9fs@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230716-fixes-overly-restrictive-mmap-v2-2-147d6b93f699@kernel.org> References: <20230716-fixes-overly-restrictive-mmap-v2-0-147d6b93f699@kernel.org> In-Reply-To: <20230716-fixes-overly-restrictive-mmap-v2-0-147d6b93f699@kernel.org> To: Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck Cc: v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Robert Schwebel , Eric Van Hensbergen X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=921; i=ericvh@kernel.org; h=from:subject:message-id; bh=U1llKZN9bzeNrf4u+gdKJoyKutM3P61zdD1PaebvrKY=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBktvsMiEBMS24QIGDx7amfXvzIA6gDZVIz5JGk1 9UCcOkz9eeJAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLb7DAAKCRCI/9X7Sl// mAi9EACZPCaFyixIwaKhfsBISAbZZ7dYCGXgefg/e4EIfgHCR+SMKdoaI7C0+tn4RF2NJQiKz3r QhemJUXk9gRiPoCk4ApRcIgNe2XErSs7A+R/i7nFTqsjSwrBWZ0VAE2YDQSQxGD+miOpR9Otzjw DCXGlLsRPgm4gCGH/PJMiAjMG3+cvVVvYAUS2ZZfhJLsr4WO1y9lrFGIve+/8UbBP8id3Eq+E8M OGY/N9Y20Enm+egiqqJkvCD7zJxIyxn+TzEjZBykD6DsQdKAmTfyyK7cIN2PznCBvsovwixTKKC 3sxdmbWlPcZh4pT1MiP8Mlq331UzgPAgiaemmYYHhYPa0hk9CLaRuCNYQ2GmXiRZ3KrW16+BEQl 1hJhEwvvejqMyZdP+jQ7C9+YVGu82rW+/CW4lD3iBLs++Sa2BZvVB1Uf5ma3cg1Ub0Y92hXpcQ3 EyhpNXUMGlMNixvsOV+ZJYg9chcGY5/nJbvRJcMUoIvPXt47AceelHzLnEyoTDuMfekXJrvDFnb bT+eZ/3baos4A2xrlfOxxji8K4qCH78/7O2teLVCKx4iSLdI17uTsRURXHfUxQhmywtJd+wjj/i GRD7MJifpXU5dWQ9LKKCuJckjpNrEBJvHCPN2NOFeTyA7obL2svqUW34W+Jiv8B+UI+0q+MNORX BJRIshvhPOR1fkw== X-Developer-Key: i=ericvh@kernel.org; a=openpgp; fpr=9696F0D196A59098A4CAD15188FFD5FB4A5FFF98 There appears to be a typo in the comparison statement for the logic which sets a file's cache mode based on mount flags. Reviewed-by: Christian Schoenebeck Reviewed-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen --- fs/9p/fid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/9p/fid.h b/fs/9p/fid.h index 0c51889a60b33..297c2c377e3dd 100644 --- a/fs/9p/fid.h +++ b/fs/9p/fid.h @@ -57,7 +57,7 @@ static inline void v9fs_fid_add_modes(struct p9_fid *fid, int s_flags, (s_flags & V9FS_DIRECT_IO) || (f_flags & O_DIRECT)) { fid->mode |= P9L_DIRECT; /* no read or write cache */ } else if ((!(s_cache & CACHE_WRITEBACK)) || - (f_flags & O_DSYNC) | (s_flags & V9FS_SYNC)) { + (f_flags & O_DSYNC) || (s_flags & V9FS_SYNC)) { fid->mode |= P9L_NOWRITECACHE; } }