diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-08-30 13:30:45 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-18 13:40:16 +0200 |
| commit | bb8108546da97d7c66a8abe93af5ce04b68b509e (patch) | |
| tree | 4711cdc3c476ce7095e16a7278ae5a1cb9ca78a3 /scripts | |
| parent | d04925fb8d7081108fba1ea21ce7a6d14e64eabd (diff) | |
f2fs: should put a page beyond EOF when preparing a write
[ Upstream commit 9605f75cf36e0bcc0f4ada07b5be712d30107607 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
