mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages
When f2fs_write_single_data_page fails, f2fs_write_cache_pages will use the last 'submitted' value incorrectly, which will cause 'nwritten' and 'wbc->nr_to_write' calculation errors Signed-off-by: zangyangyang1 <zangyangyang1@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
e53c568f46
commit
c84c242493
2 changed files with 2 additions and 0 deletions
|
@ -1551,6 +1551,7 @@ continue_unlock:
|
|||
if (!clear_page_dirty_for_io(cc->rpages[i]))
|
||||
goto continue_unlock;
|
||||
|
||||
submitted = 0;
|
||||
ret = f2fs_write_single_data_page(page_folio(cc->rpages[i]),
|
||||
&submitted,
|
||||
NULL, NULL, wbc, io_type,
|
||||
|
|
|
@ -3154,6 +3154,7 @@ continue_unlock:
|
|||
continue;
|
||||
}
|
||||
#endif
|
||||
submitted = 0;
|
||||
ret = f2fs_write_single_data_page(folio,
|
||||
&submitted, &bio, &last_block,
|
||||
wbc, io_type, 0, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue