f2fs: fix to unmap pages from userspace process in punch_hole()
authorChao Yu <chao@kernel.org>
Wed, 25 Aug 2021 11:34:19 +0000 (19:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:16 +0000 (13:40 +0200)
commit4b71928e5c547e774cb4767da0959f9970a4f0f0
treeccfb67903e790ceab5d1a40b377a61dc229266d2
parent1c934aba9fd531580f5fedefcd3364d68c560471
f2fs: fix to unmap pages from userspace process in punch_hole()

[ Upstream commit c8dc3047c48540183744f959412d44b08c5435e1 ]

We need to unmap pages from userspace process before removing pagecache
in punch_hole() like we did in f2fs_setattr().

Similar change:
commit 5e44f8c374dc ("ext4: hole-punch use truncate_pagecache_range")

Fixes: fbfa2cc58d53 ("f2fs: add file operations")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/file.c