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

Commit 046b4ced authored by Chao Yu's avatar Chao Yu Committed by Ritesh Harjani
Browse files

f2fs: fix to account IO correctly



Below race can cause reversed reference on dirty count, fix it by
relocating __submit_bio() and inc_page_count().

Thread A				Thread B
- f2fs_inplace_write_data
 - f2fs_submit_page_bio
  - __submit_bio
					- f2fs_write_end_io
					 - dec_page_count
  - inc_page_count

Cc: <stable@vger.kernel.org>
Fixes: d1b3e72d5490 ("f2fs: submit bio of in-place-update pages")
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Git-Commit: 2cc5dcf7a9e074c5bdfdefea1801aa0a657750d6
Git-Repo: https://android.googlesource.com/kernel/common


Change-Id: Ifff46ef82be68fc910ea3dbcc2299a22664587d4
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent e04cd35f
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