From patchwork Tue Jul 18 20:50:15 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: 13317681 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 EB83D168BB for ; Tue, 18 Jul 2023 20:50:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE776C433CA; Tue, 18 Jul 2023 20:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689713422; bh=2UE7/GpbCo0ZLCDtrowUpPJ2/RFcc5BlXQYiwH9D9H8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=j5IlBFobm1C45XEvDknqzROzNQfPaWX0bWHKp0csPkt+XIXS3HvpQT7weNalAQBGd 444YCSDy5RF2bUDvqdrVbb65X7PeygRyBBxLB7Ry6+UkY7xdivw79Yq7poXZEDyDSs nMtChEgicZ6SeBP+OypSJaQhiXwqv32D9m+sg5vBmMjLYemeXgJHDV+etm3tdPppgn XYpNI7LtMHBbVtycvUHiESfWRyZ1sLGC+SvjH/uPBZ9RaaSO0dtc3vVGTYiI0+jppk RLqa6rZ/UHkB5J/BwZattvsKraOY8Xl9AilFQPdITysBiOis6jtxCDxUAMEcVxj2Wr Q6+WeH1OSUV9Q== From: Eric Van Hensbergen Date: Tue, 18 Jul 2023 20:50:15 +0000 Subject: [PATCH v2 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-v2-1-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=853; i=ericvh@kernel.org; h=from:subject:message-id; bh=2UE7/GpbCo0ZLCDtrowUpPJ2/RFcc5BlXQYiwH9D9H8=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBktvsMxhws6YtW15OsmDYDsLrt3VSaPGiYjno1y BPJ8rfcUaaJAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLb7DAAKCRCI/9X7Sl// mB5JD/9jTRJO0ZCiXN97lvdEJl/K4A3/oYqIg+tEx3Eqz+D9M5xBYx6CnkB0dFTWVvVbgWgCrr3 qB73CX0HY2Awao3H5CON5bH9+jA6mMhPNgs2N2sOnykog1/Mo+sUzik2OLgh/tKHal0euSArUAY PQC36KETj3/c1PmYD4BzWOaK2EtOIqSHUvibdQsiKBW0IuA4yylvy+Udq9tpfmLHHK+ZGdM8ltH PH+BfrNhtiffgeb3Qo6q1HIxwJMfV2e3H05xpjvCxBINHc2Vtxv9A8bo8r3PjTEAHdYHW6cwP93 oAQGl0G78oKUV6btn2CO/qkStXzrailiktHxlTewZIUWmyAfaH/nuIYW81IdzNPBwb6/mqp57Qt RX+/1Iyn9HJVrLSAr3IxxPnIRQT+Biq0xBthfqkb2tqz7sOMt7Xg+J4QKVGckr6HLe923YmKZzo lyG1QIGj+I9/odfo/gSF+pzKDz6ya2V90ae1T9E7unM2tvwn/P6Z8FNbth6opOzFWpY3EpVEZoO OFdAmk9h2+sGL8zZ0o6XuviQUXRxMj6qIFxjzVMie6z8uyWIX0amZonHDVdRVWHLLhaI+pzy3Na VAoGAbD8WfWnXLDf+Ycdy1TYLquYOa9fbS7YljT3PDjBbSJTZK4o4Pt6Klj2FAYTuuICC3dO6uP tqyUECtCgkMna3A== X-Developer-Key: i=ericvh@kernel.org; a=openpgp; fpr=9696F0D196A59098A4CAD15188FFD5FB4A5FFF98 This eliminates a check for shared that was overrestrictive and duplicated a check in generic_file_readonly_mmap. Reviewed-by: Dominique Martinet Reviewed-by: Christian Schoenebeck Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 2996fb00387fa..bda3abd6646b8 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -506,8 +506,6 @@ v9fs_file_mmap(struct file *filp, struct vm_area_struct *vma) if (!(v9ses->cache & CACHE_WRITEBACK)) { p9_debug(P9_DEBUG_CACHE, "(no mmap mode)"); - if (vma->vm_flags & VM_MAYSHARE) - return -ENODEV; invalidate_inode_pages2(filp->f_mapping); return generic_file_readonly_mmap(filp, vma); } 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; } } From patchwork Tue Jul 18 20:50:17 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: 13317683 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 F07FE101ED for ; Tue, 18 Jul 2023 20:50:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C48B2C433C8; Tue, 18 Jul 2023 20:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689713424; bh=jsjxHYDmiK3p+nOT5h02WYi1N3MzrRVdd2+TaPsAMcY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ov7F4c874drS+8VG1uVw0WB825cVnx7bjr0+UgPYnPVq0LZ+TAxjfn54bGtVweBYM u2YrIDq119CAI1Wx5fuuNT7DcN6DRo2wFYKJLgP0Qvuc6fsr2Sxq3z3ZhIgbtshbBe MIMnHC32Q+Bn48Fs5GAjCFKTMUo+Sj2akZKBnH3dtv+k4lvuh80vDd1PzqosEmCxn2 TA3ScaWNq+Z9yLzicwUVqShZog2zbOWfAtqXvqURDHijmEieucXjc8bw54xRjE3vTU ZG47TGAi5JUTwSANwj1XH//mExHZD9dbguZ1Ex/6NoAm4aIk5RF+ax8T7V53iqP17C Ct8qkkGMZJhlQ== From: Eric Van Hensbergen Date: Tue, 18 Jul 2023 20:50:17 +0000 Subject: [PATCH v2 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-v2-3-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=955; i=ericvh@kernel.org; h=from:subject:message-id; bh=jsjxHYDmiK3p+nOT5h02WYi1N3MzrRVdd2+TaPsAMcY=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBktvsMuhuT2Ny13fKIEogkB4iNxaw3dU7ivO5zu pvtCeoh8q6JAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLb7DAAKCRCI/9X7Sl// mGwgD/oCnQ6KwfSKR/K/Jq68YlKph1hzVl4u1NQzSg9tvezTVWnVsYjTxyJU60aVg1GWJGzrl70 tmG4LIN6ec9XRxP4dEDBP4FavHOiKnGnzZ2aXwOT2wtNMgkhuMfM8W2FGANt2jHg5b/JMYeYLkw Eh7Xyt3xK8VJxyICuPDCgpt9h6L5DTgJBkIFAiajmGKzbPHV0RhsFUuULMoc67qz0S3pjNL4EEu oSkg8VCadfi2FUJBGlOl3TUZ/4w5qqo3F+SqaOjWYsKu0wMeAkTNmRND0VQIirOQNWcCj3cDPET RltSMBJxX3Vw+IKE7YfMXJrY8CLG52YemdY//LKQ2x6KHAMXkuonOa9kRM8PFEshsXikCEqR0Y0 yypSLlwINnEfrEiCkWUE4grAkovh4iwjoAvTdgijuQ5MrQP/JbIvX9bPzHIpbFTiKp4unhUcIzS Llbh2a1gOv21VKk5P9qNJKfgXn9mt9sPOjubgkYtnS4HEqf4INgyAKq9Oeu4hckapKrEIvnHWWh lxPYPqvzyegZycncMyIEGhsEJ0LOSX/1a2AtLo/47B2JNkR69UUMFbNr/9iJT10iK9Wt78Ami4C S32DO1ef3Xa0VN9cDT1jTosBoBHZIu2DULwUoz4r55S+7ylGHjAa21Qec3w72qetDf5AUf1896x FXwVyE4dpalAD1A== 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. 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 297c2c377e3dd..29281b7c38870 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 Tue Jul 18 20:50:18 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: 13317684 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 28C4B171C6 for ; Tue, 18 Jul 2023 20:50:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEACFC433CB; Tue, 18 Jul 2023 20:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689713425; bh=scxEmsmSS3yAw8Pb9vs+lLcPVOwcbwDaNQFx5fsoDzg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=gQLfe2sZU78/8tGyOQjHfsxtD3oQUv+Px5p2nKSG2zOFChi/ssTKr3JBCzye1qq+8 7VNbb0lJBrjlbHvzinxbFVOanGpdbgiFHSIpmwpcfz6sOowDLYcJFdexcC5UZQl2rc SIWcIec7RA+pcZhOZbMmxW1u/MvG+Q55kF3HcCJ4d2fWg+ORaLXnpXhqrJATV5Jpvc KfFkXep5yxpZYkcOYus1diAFXr7sFso2FEF81FqQIm89o1eGkiPbDOy+41kVGnGr5w peJolAYeeC7dwcwWHCBKcGrmv9x7qJfarLKKD29P63QWodHBhllrC+vUff5TJ5SVm8 HgB8WgpmNxWwg== From: Eric Van Hensbergen Date: Tue, 18 Jul 2023 20:50:18 +0000 Subject: [PATCH v2 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-v2-4-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=634; i=ericvh@kernel.org; h=from:subject:message-id; bh=scxEmsmSS3yAw8Pb9vs+lLcPVOwcbwDaNQFx5fsoDzg=; b=owEBbQKS/ZANAwAKAYj/1ftKX/+YAcsmYgBktvsM6EaD3uQIChje/362palMFSayDgR3qaOWO dsMdF9cc6qJAjMEAAEKAB0WIQSWlvDRlqWQmKTK0VGI/9X7Sl//mAUCZLb7DAAKCRCI/9X7Sl// mLrFEACWjUV9pX/ivEzfBsAWNxyETtVIY4AVufEY6ephLHNpEIegrcmzupnJ+Jz7uFRLdTLMF7c 9GQPcjG9oq8tu7JxTsvRJd5dRRDunPi+caDam+5BmpVMVJ4JjJEoTyX/EwSylM7BX8zGcYtgcBc BOYOTznWqLKc7O6QGewfAl19EbsbZL8d6EFAo19p/LEo7sMR1Jy0u4c0/9gPniZ+3HDMZtz3Hs0 SXLwNi9gr06sAlxc2jBFyy7cgSbXWHzD/+Wp4WWsIqeL7h7jUHKfH6WYmsIbYi2fPMejghZeNsI IDyxbaHm4jSNYnLulLDuTK7JeO/03t1zyZryLh4UfVBeYSXSotY9HycOXQWjDGue0ScZddviXU4 hxV9+wq5j6Zn2AIpej8C07r5xQ1oNAYRG7xtmbETUYSDUQP+D5fTJHI4JWnZCbRZriNzbgW0TyF d6sh9ARoaoyUNabFuzxwobOkuS9w78MPfA7WNOfje2aGsul9v4YT497597CijRYqnRsnudf8Wsg ay0c2ME8h8RatfPVZV1GtmqrOTDf5ZzQdforHXTSl99X9VzlunbiDn3dJa50gVc27bOuQ7w6eHi m8jBvuxPu6Sb7gDTRshrje4uv32/pYL+0vwN17BLFnq6bYlMSmKqW2ejcx5MNQouF33jBJaX18e hUNzK/SW/afmSsg== X-Developer-Key: i=ericvh@kernel.org; a=openpgp; fpr=9696F0D196A59098A4CAD15188FFD5FB4A5FFF98 There was an invalidate_inode_pages2 added to mmap that is unnecessary. Signed-off-by: Eric Van Hensbergen Reviewed-by: Christian Schoenebeck --- 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 bda3abd6646b8..3809f3a531499 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, "(no mmap mode)"); - invalidate_inode_pages2(filp->f_mapping); return generic_file_readonly_mmap(filp, vma); }