Commit a5d8b9d
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>1 parent fe15bc3 commit a5d8b9d
1 file changed
Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2453 | 2453 | | |
2454 | 2454 | | |
2455 | 2455 | | |
2456 | | - | |
2457 | | - | |
2458 | | - | |
2459 | | - | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
2460 | 2459 | | |
| 2460 | + | |
2461 | 2461 | | |
2462 | 2462 | | |
2463 | 2463 | | |
| |||
2565 | 2565 | | |
2566 | 2566 | | |
2567 | 2567 | | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
2568 | 2574 | | |
2569 | | - | |
2570 | | - | |
2571 | 2575 | | |
2572 | 2576 | | |
2573 | 2577 | | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
2579 | | - | |
2580 | 2578 | | |
2581 | 2579 | | |
2582 | 2580 | | |
| |||
0 commit comments