aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2021-08-30 13:30:45 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2021-08-31 14:39:39 -0700
commit9605f75cf36e0bcc0f4ada07b5be712d30107607 (patch)
treec1a8812191b839f0e5a1daab2ce71ccb911bb1a9 /mm
parentf2fs: deallocate compressed pages when error happens (diff)
downloadlinux-dev-9605f75cf36e0bcc0f4ada07b5be712d30107607.tar.xz
linux-dev-9605f75cf36e0bcc0f4ada07b5be712d30107607.zip
f2fs: should put a page beyond EOF when preparing a write
The prepare_compress_overwrite() gets/locks a page to prepare a read, and calls f2fs_read_multi_pages() which checks EOF first. If there's any page beyond EOF, we unlock the page and set cc->rpages[i] = NULL, which we can't put the page anymore. This makes page leak, so let's fix by putting that page. Fixes: a949dc5f2c5c ("f2fs: compress: fix race condition of overwrite vs truncate") Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions