mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
ceph: put folios not suitable for writeback
The batch holds references to the folios (see `filemap_get_folios`, `folio_batch_release`), so we need to `folio_put` the folios we remove. Tested on v6.18. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/74156 Signed-off-by: Hristo Venev <hristo@venev.name> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
committed by
Ilya Dryomov
parent
10d9be4011
commit
544576f0f0
@@ -1336,6 +1336,7 @@ void ceph_process_folio_batch(struct address_space *mapping,
|
||||
ceph_wbc, folio);
|
||||
if (rc == -ENODATA) {
|
||||
folio_unlock(folio);
|
||||
folio_put(folio);
|
||||
ceph_wbc->fbatch.folios[i] = NULL;
|
||||
continue;
|
||||
} else if (rc == -E2BIG) {
|
||||
@@ -1346,6 +1347,7 @@ void ceph_process_folio_batch(struct address_space *mapping,
|
||||
if (!folio_clear_dirty_for_io(folio)) {
|
||||
doutc(cl, "%p !folio_clear_dirty_for_io\n", folio);
|
||||
folio_unlock(folio);
|
||||
folio_put(folio);
|
||||
ceph_wbc->fbatch.folios[i] = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user