diff options
| author | 2026-10-09 09:53:31 +0000 | |
|---|---|---|
| committer | 2026-10-13 18:44:55 +0000 | |
| commit | 2eebc31ae5f53e1066bb6238c8087c23b688ad17 (patch) | |
| tree | 5ecda1bade779387a0896414452546e3a131cbad /scripts/Makefile.thinlto | |
| parent | f2fs: remove mappedtodisk flag usage in mmap write path (diff) | |
f2fs: allow pinning empty compressed files
Commit a64a3fec11e7 ("f2fs: force out-place update for all writes on
compressed file") updated f2fs_should_update_outplace() to always
return true for compressed files. However, this function is also
called during f2fs_ioc_set_pin_file() validation, so pinning an
empty file with compression enabled now fails with -EINVAL before the
compression flag can be stripped.
Fix this by guarding the f2fs_compressed_file(inode) check with fio in
f2fs_should_update_outplace(). This preserves forced OPU for actual
compressed writes (fio != NULL), while allowing f2fs_ioc_set_pin_file()
(fio == NULL) to proceed to f2fs_disable_compressed_file(inode).
Cc: stable@kernel.org
Fixes: a64a3fec11e7 ("f2fs: force out-place update for all writes on compressed file")
Assisted-by: LLM
Signed-off-by: Joanne Chang <joannechien@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
