diff options
| author | zangyangyang1 <zangyangyang1@xiaomi.com> | 2025-01-13 11:05:18 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-01-13 18:49:38 +0000 |
| commit | c84c2424932d18cf3888adfe9bd16f95dc5d9fd4 (patch) | |
| tree | 8c4444e76724ba4d9ebf44478d889329114d293e /fs/f2fs/compress.c | |
| parent | f2fs: add parameter @len to f2fs_invalidate_blocks() (diff) | |
| download | linux-c84c2424932d18cf3888adfe9bd16f95dc5d9fd4.tar.gz linux-c84c2424932d18cf3888adfe9bd16f95dc5d9fd4.zip | |
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>
Diffstat (limited to 'fs/f2fs/compress.c')
| -rw-r--r-- | fs/f2fs/compress.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index c5e42eec8ac9..985690d81a82 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -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, |
