diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 334e41a7c2f2..b1b947d005ce 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1414,8 +1414,6 @@ void ceph_process_folio_batch(struct address_space *mapping, doutc(cl, "%llx.%llx will write folio %p idx %lu\n", ceph_vinop(inode), folio, folio->index); - fsc->write_congested = is_write_congestion_happened(fsc); - rc = move_dirty_folio_in_page_array(mapping, wbc, ceph_wbc, folio); if (rc) { @@ -1428,6 +1426,8 @@ void ceph_process_folio_batch(struct address_space *mapping, break; } + fsc->write_congested = is_write_congestion_happened(fsc); + ceph_wbc->fbatch.folios[i] = NULL; ceph_wbc->len += folio_size(folio); }