Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit eca617bf authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Zvikomborero Vincent Zvikaramba
Browse files

f2fs: fix redundant block allocation



In direct_IO path of f2fs_file_write_iter(),
1. f2fs_preallocate_blocks(F2FS_GET_BLOCK_PRE_DIO)
   -> allocate LBA X
2. f2fs_direct_IO()
   -> return 0;

Then,
f2fs_write_data_page() will allocate another LBA X+1.

This makes EIO triggered by HM-SMR.

Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>

 Conflicts:
	fs/f2fs/data.c
parent 7b61b8b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment