From patchwork Wed Jul 19 16:22:30 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: 13319188 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 D40331641C for ; Wed, 19 Jul 2023 16:22:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FB56C433CA; Wed, 19 Jul 2023 16:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689783771; bh=K6oAnsvQEIZrftCXh7mBn5FA+pVc8rhUAGklED1yUHw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=qZv8/kh4Iyuuiswu7oyZwUcv4dJT5RoNFpwxVuluWlCwCWmretLUk5PaKDIhLDoBR j902l4VPO1zqp8LwQm0lCqOiPKrAzD88mBt8H/3HsjOnXfwPOau7uGUwOyJXJ8FPdH ErbPXrOPlV3q/wjdLlC68hlxxNlKjHjaHuHdJGCEUdjAuaQLrbjH9N6CNqITucpcgE K6EzBQV/GhH1UsrcxCeyAw1jTqSI8O3eV4OCzu6HqKyPXYvyr1A/UqiPIwIdudQaTJ yLmvBN2oR94w8cW7zvq7I4rlg311Ez1B4W3U4Fkv3lOhC6fnGPce7rWM0hkRTyEwDO is0D+7MER80lg== From: Eric Van Hensbergen Date: Wed, 19 Jul 2023 16:22:30 +0000 Subject: [PATCH v4 1/4] fs/9p: remove unnecessary and overrestrictive check 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-v4-1-a3cd1cd32af2@kernel.org> References: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> In-Reply-To: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> To: Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck Cc: v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, kernel@pengutronix.de, stable@vger.kernel.org, Robert Schwebel , Eric Van Hensbergen X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1223; i=ericvh@kernel.org; h=from:subject:message-id; bh=K6oAnsvQEIZrftCXh7mBn5FA+pVc8rhUAGklED1yUHw=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBkuA3YMIjmuoMKqeY2BsmWo6nZ5varMUeKrXq1A ZgW9vAkk0SJAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLgN2AAKCRCI/9X7Sl// mLVmD/0YVO3O0CHQoWPMnoGtCl1BrCJgi4NkTHU1J4rP0H9hKOJ8OUaephCEQ1KU3WZzKEKMK/b uYtwMcqyqd+PX70SbCMFlQhZxsiiNOvDtUpaOVC89rTozUMorggCYvVr95NmQ80HlViSHCadvIX K4i1W+sMcga84ViNqDgt+mFn0urJ6z44hs6skVwcIDDImceU9lunAM2BejqtK3w0AFkMXEzqnOX SdMeV03rF6zVFwK7/7xACx+dx0MJVlC/UP6o7KLTTkoU0Nzr4hB4ZqaCy61b8vMqUln7lVRxZaZ jk0zwMV+5XN0KBN7eb6WtzDeURR97FOLTww1chVWjIaO2W8mNc4z16eSuDHMTk7ZlxkTM6avVSv Kqb7YDf5brbCHsuQb/FjwBM1Fq44newsqNlWNVbSIhrRczmt4xD1eRU+B6mfr59IvMOcW5jPEiR kzuQevXCHkBmxgMLUXg0cLPCSr8non0kUbz1NQAkU6Ba5mLopt8keYqdr7DeH2blqkUKdRfLp6q BHaw4Yjh+y/g62WWlkuHNOfSngAdz4T8tse1IQVoKMbsUiXt9Iof6lBMRPhCLnIGoF/K3pIcLDc +mdwaVFmkNp3LYDpIzCwjgUoIYp2gGOZLJsVW0/izToqd0mxVBlXPYXrOgb+ANu0prCENGMgOZ2 gwFRnjJFnsjC0zw== X-Developer-Key: i=ericvh@kernel.org; a=openpgp; fpr=9696F0D196A59098A4CAD15188FFD5FB4A5FFF98 This eliminates a check for shared that was overrestrictive and prevented read-only mmaps when writeback caches weren't enabled. Cc: stable@vger.kernel.org Fixes: 1543b4c5071c ("fs/9p: remove writeback fid and fix per-file modes") Reported-by: Robert Schwebel Closes: https://lore.kernel.org/v9fs/ZK25XZ%2BGpR3KHIB%2F@pengutronix.de Reviewed-by: Dominique Martinet Reviewed-by: Christian Schoenebeck Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 2996fb00387f..9b61b480a9b0 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -505,9 +505,7 @@ v9fs_file_mmap(struct file *filp, struct vm_area_struct *vma) p9_debug(P9_DEBUG_MMAP, "filp :%p\n", filp); if (!(v9ses->cache & CACHE_WRITEBACK)) { - p9_debug(P9_DEBUG_CACHE, "(no mmap mode)"); - if (vma->vm_flags & VM_MAYSHARE) - return -ENODEV; + p9_debug(P9_DEBUG_CACHE, "(read-only mmap mode)"); invalidate_inode_pages2(filp->f_mapping); return generic_file_readonly_mmap(filp, vma); } From patchwork Wed Jul 19 16:22:31 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: 13319189 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 27C0911C93 for ; Wed, 19 Jul 2023 16:22:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2FD3C433CB; Wed, 19 Jul 2023 16:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689783772; bh=MhQlJrTsZHmha2KJIBaaG75cljAu9xtlF2pUFmjLQl0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ybo+jM3VJ9XHhauSCwdIsqdzWeqFQzs/qxba1+/HJ7MFo1coteRMEFtDOAJVonupb x5V9PtV/MBliY+teolKzToutb94UNyG0gFL+uw5WgWyv6xZ0rvKER6mZqbUaNQAKW6 p3XcOg8yabNhSB+ci6Msr+j6Jjhnh10f5Z31/itKq3Xdhl+MnJvTn10G4OP/uoLmqW UmwS5f8GF3xEwCLE0e5qxLKHeCRGxP7uPke3mN4GBt+JsOozSU4k1SQ8SJlC5mUOCz OpHzfdrcrcOqD9Uf6F1e9iX43wj6y5XEnUylH3Ftmea7HdfzxnfhE5GR0ElQ/qrFrX ivJTQunK94Uww== From: Eric Van Hensbergen Date: Wed, 19 Jul 2023 16:22:31 +0000 Subject: [PATCH v4 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-v4-2-a3cd1cd32af2@kernel.org> References: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> In-Reply-To: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> To: Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck Cc: v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, kernel@pengutronix.de, stable@vger.kernel.org, Robert Schwebel , Eric Van Hensbergen X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1023; i=ericvh@kernel.org; h=from:subject:message-id; bh=MhQlJrTsZHmha2KJIBaaG75cljAu9xtlF2pUFmjLQl0=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBkuA3YG2lCTw7UKGBhazSWgJkV4G2nM6ldEheUr xyRiO0BqDCJAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLgN2AAKCRCI/9X7Sl// mKzwEACfb3WBpP4t95Qby/jwVvjdngxQWel1ZL9JHoeb1r1FKF+FybflItJj4JCmqeAcOc9/Vh8 xsP8vcee8Wjp2XQ5Z0NEUNX0Rp9taMXvUxKsVkjTrzmpjeRlM8+7dBnZzGWJ3PBGpMEpu0urFJv jIk7515+CoKprBoITqKEORaMcdOSitNRxUhGFZ82XC31fzbdH8ehG+KJ9lLqpNqUd9prTQX6YTr 5lVAhp7ClbOkxH9aefpNBmpWeS0mfTp5FLE4ysrjUANkzqm9biqagH2i79dm/IyY0qEC29BUG9Q hXKuT0RUiNFCX4lB9RLie3dT4217w65D0FcQ18agAEm9pP4nmHoNAB5gtvvQzE6mBYM2rQuZ5WZ lC6z32z+OB5Cb+Qo93fG8lUMPv1egOGP5IqTgHkmqud/RHpLXWHqztbAxB0TnNsXfK81Jj3Hc/v 4IRUtqhBgIoOEPxQQQC7AkJ5TrQUTRvmKJYC3J+RHjd91bd065inBCqd3b9rSaQN7KOcPzMgxcD uLasiATDItiixE4D0Q9Hrq8xCNWdEYbBATcji3CaKbwnT0eKDcOORD1FUOLOPlEdGs56nSC+nHM bVTwsjiIKX5tkQqXnPBchUlUcpLhOm3HKzoQ8s2flq2wWHkuMHedzeT6zH5qURqbQwqCOU0mbEP Pn82PdTDe8cLk3w== 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. Cc: stable@vger.kernel.org Fixes: 1543b4c5071c ("fs/9p: remove writeback fid and fix per-file modes") 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 0c51889a60b3..297c2c377e3d 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; } } From patchwork Wed Jul 19 16:22:32 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: 13319190 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 EA67B1641C for ; Wed, 19 Jul 2023 16:22:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB223C433C8; Wed, 19 Jul 2023 16:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689783773; bh=exSvQfCJy5HOJ0e35lnsgXGxg66VQJVaJEEUsXz/SvI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=tEvY4snmwkL34r4FGAGuqjLcHEgVdTgJL7BkqvldfJSzOA0wVDMT+5i0gW3De3Na5 K2oUFM4Oqb8xENigBbUHzYaO+U1h3Qu9WNmeBlB6zxs9fR50bYv2ZUnx3nX8iFyBfl 7snwPG7CxmUdQGJ+xE1TB/G8khUX1sBcmapwjAeHRDcsb+GcPVUDmtXW1HXmEgeTjI JxkPjE3ewejr0p2GkZi9UY30xBfbfN+p0GH5UD6A8uTa36diZgBgXg6A4ALqYa4+GR GoJU4hXCW0kebZVKQsPFzFzVTeGClmyYf2aengwtHfGfdBREXM6xPq0yjK6uWRttVy MgEQ30L9oV3Mg== From: Eric Van Hensbergen Date: Wed, 19 Jul 2023 16:22:32 +0000 Subject: [PATCH v4 3/4] fs/9p: fix type mismatch in file cache mode helper 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-v4-3-a3cd1cd32af2@kernel.org> References: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> In-Reply-To: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> To: Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck Cc: v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, kernel@pengutronix.de, stable@vger.kernel.org, Robert Schwebel , Eric Van Hensbergen X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1057; i=ericvh@kernel.org; h=from:subject:message-id; bh=exSvQfCJy5HOJ0e35lnsgXGxg66VQJVaJEEUsXz/SvI=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBkuA3Y9X0qfbFlJ6sfM0lCKgu7/mb+WN7TKAZPg xXIlSHSqv6JAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLgN2AAKCRCI/9X7Sl// mEXNEACjLvXN3fAnnDDhgVTEQKwe5zl9FzLhrDKt0Rs8wPEJppkcw5W8lTGL8Z8pnnuW6iOsvb6 BsqipDh/ubGHfcTV/7vD4Pp4eOkgfKy8nRtaGo+RZoLbI+RayB+szhSwNap0Bh1DYjhn3OVChtz 8gK0ffqrN//hFCI6hwdJ5Og2FIfpfWTytO+HG0gPtqqz8hdsiG1ath8JO9hfR3E9DScd4F/LziW UabyqZdlx+VQDwrYTEc7uSuTD2VoOW82mPIHLeDrL/aLuGnAns/kp2R7gPLv6+DMu2qeEcvsjxQ FgdX43EPhZ/K6mVHuQH8YkpANJIiyDs3mK4l24nvFMc63XUe3vBL/RN4Trhyzw0Zqqjs9Oml07H 1Rt5eJcHiVLJWDTw2B9luZTcxGWQefU6bSr63GQcztF5YyH2IFaKont0zGQmor2OIQi694uDJTm Gq+jIfKhbqFL7WxlkJPycDt/z31pql1OkyUXnHfrhmNFP5IiMb2FY4f5y6ShO4xRRzl98ms1/vC udsil8mTAQcSoObpUg5PJfqIfskn/W7WehlqlPc0LD24bPG6grQkxr3jMIaP+mYnmKXGtzT0xSF nvvvBp8KIYprh2ZtuUiKFRaas6/TqFXNymBkEw3gv+sMBI/Bw6uyDgeuBR+sCFuXkGT0HjrgcKQ ez+Is1DC8PVMQow== X-Developer-Key: i=ericvh@kernel.org; a=openpgp; fpr=9696F0D196A59098A4CAD15188FFD5FB4A5FFF98 There were two flags (s_flags and s_cache) which had incorrect signed type in the parameters of the file cache mode helper function. Cc: stable@vger.kernel.org Fixes: 1543b4c5071c ("fs/9p: remove writeback fid and fix per-file modes") Reviewed-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen --- fs/9p/fid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/9p/fid.h b/fs/9p/fid.h index 297c2c377e3d..29281b7c3887 100644 --- a/fs/9p/fid.h +++ b/fs/9p/fid.h @@ -46,8 +46,8 @@ static inline struct p9_fid *v9fs_fid_clone(struct dentry *dentry) * NOTE: these are set after open so only reflect 9p client not * underlying file system on server. */ -static inline void v9fs_fid_add_modes(struct p9_fid *fid, int s_flags, - int s_cache, unsigned int f_flags) +static inline void v9fs_fid_add_modes(struct p9_fid *fid, unsigned int s_flags, + unsigned int s_cache, unsigned int f_flags) { if (fid->qid.type != P9_QTFILE) return; From patchwork Wed Jul 19 16:22:33 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: 13319191 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 1B10511C93 for ; Wed, 19 Jul 2023 16:22:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11562C433C7; Wed, 19 Jul 2023 16:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689783775; bh=k0K6ocifQ0ciwTzxXH7M8DUDHsKfrzNua/KxUjjXkFA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=T2LZDWcO5puV7VRCOsBgGotJisgKYwNNFQPAB/HDRTnd0Ladvgmjla4PWV4BzPlYt i5xnpx5OP7rCjVfadkGllgwQuwN/eKoDlsQBe22il4LQzHMWer1aApYyMMSLWl93nH ipkU+jYlLEzhSpmE5oJlURyvBuQEhyZpl47om/5yysQ7Smn3Qg6szrq4OY1rk6R1EV QNdrGIH+VXh0LsjbUaXTquUsLvNjePH8ah6azGRLt7xXZoIqNaXR0lBsG3js4uYk2S CLddkeUGPjnORTEJfT5D7Vsoy7rZaCAVSD6xKsOKY0hZtNWJtHMp3p4k1rOqqKOdt3 VtNvQayijlXaw== From: Eric Van Hensbergen Date: Wed, 19 Jul 2023 16:22:33 +0000 Subject: [PATCH v4 4/4] fs/9p: remove unnecessary invalidate_inode_pages2 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-v4-4-a3cd1cd32af2@kernel.org> References: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> In-Reply-To: <20230716-fixes-overly-restrictive-mmap-v4-0-a3cd1cd32af2@kernel.org> To: Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck Cc: v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, kernel@pengutronix.de, stable@vger.kernel.org, Robert Schwebel , Eric Van Hensbergen X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=894; i=ericvh@kernel.org; h=from:subject:message-id; bh=k0K6ocifQ0ciwTzxXH7M8DUDHsKfrzNua/KxUjjXkFA=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBkuA3ZNyXqWHLoseJ3EWeJrogkDkPGJ82+WR+E+ 0fnABkiAwuJAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLgN2QAKCRCI/9X7Sl// mH8ND/9VN84P0uGYO69TQEHK08nFdvfeZKbb3riQpl7CAFJtG+EtOYdws4XwZ8FUHomM1KMghDr dPYNggkxw5oDu+dtozFz92PR9eBD8Ip+DBFPoilAM/x4/Z1Uq2emVkldZYVIPu6ry/DxZ+Safne pWnMVYb1tK6e8gHgUL85BLi+r4koXFs7GZBtQzjGyiKGE5ruEPgc2/wRuf8z2lceXBVAwjdRvAa h2mvQ314jDebSO2w2eBREQvuy2BiylBEHvUHebN/agJpNSeh420tc9N/We9aiybdxflBv777gTq Wi3hytnPFjfErlzhhLs0wV1ZOw40DHbMSdlIfUpRg/6JcXmAZF7NEAjmysyMuf1+xtERKNjYFu9 T2K+G1lQc0oACO07LebKqrY+aOrAYco8FZ9lEiKcnUWGEACgYiJgMIHJso9CCHY9+BM006uCuOW nJyWFxuRMYyYVKOh5w9jeKn3xXbx+rgTv4Fyy6Issr0hfD5+vUIckGIX36kaf1FfbsETlkzKrZI F1wQGbO466Ji+hjUYC5NpG5IduYMELK2gD5DrPck47M1BbGYhlO0poXe2HY2vRA0yojTLF9D7kd qe/S3ODW3fInC1vZsOPDoPtqGpbkF8LuX/G46f/kXVzW0Njm5eExaauysApKAC40+8cztAVmmiL ylMKFr4wG2hvSEg== X-Developer-Key: i=ericvh@kernel.org; a=openpgp; fpr=9696F0D196A59098A4CAD15188FFD5FB4A5FFF98 There was an invalidate_inode_pages2 added to readonly mmap path that is unnecessary since that path is only entered when writeback cache is disabled on mount. Cc: stable@vger.kernel.org Fixes: 1543b4c5071c ("fs/9p: remove writeback fid and fix per-file modes") Reviewed-by: Christian Schoenebeck Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 9b61b480a9b0..11cd8d23f6f2 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -506,7 +506,6 @@ v9fs_file_mmap(struct file *filp, struct vm_area_struct *vma) if (!(v9ses->cache & CACHE_WRITEBACK)) { p9_debug(P9_DEBUG_CACHE, "(read-only mmap mode)"); - invalidate_inode_pages2(filp->f_mapping); return generic_file_readonly_mmap(filp, vma); }