mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02: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
|
|
@ -1551,6 +1551,7 @@ static int f2fs_write_raw_pages(struct compress_ctx *cc,
|
|||
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 @@ static int f2fs_write_cache_pages(struct address_space *mapping,
|
|||
continue;
|
||||
}
|
||||
#endif
|
||||
submitted = 0;
|
||||
ret = f2fs_write_single_data_page(folio,
|
||||
&submitted, &bio, &last_block,
|
||||
wbc, io_type, 0, true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user