]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
f2fs: fix to unlock folio in f2fs_read_data_large_folio()
authorChao Yu <chao@kernel.org>
Fri, 16 Jan 2026 06:31:15 +0000 (14:31 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 19 Jan 2026 17:07:47 +0000 (17:07 +0000)
commita5d8b9d94e1863f3ebb7182c238b2c713f6f4efd
treefe7f55bfd9f3ac6cf43e9c7c7c75184aacd9d7e3
parentfe15bc3d447c5ee61dbea41c9e9a11fa2968d32d
f2fs: fix to unlock folio in f2fs_read_data_large_folio()

We missed to unlock folio in error path of f2fs_read_data_large_folio(),
fix it.

With below testcase, it can reproduce the bug.

touch /mnt/f2fs/file
truncate -s $((1024*1024*1024)) /mnt/f2fs/file
f2fs_io setflags immutable /mnt/f2fs/file
sync
echo 3 > /proc/sys/vm/drop_caches
time dd if=/mnt/f2fs/file of=/dev/null bs=1M count=1024
f2fs_io clearflags immutable /mnt/f2fs/file
echo 1 > /proc/sys/vm/drop_caches
time dd if=/mnt/f2fs/file of=/dev/null bs=1M count=1024
time dd if=/mnt/f2fs/file of=/dev/null bs=1M count=1024

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c