Max Kellermann d6fd6f8280 ceph: fix memory leaks in __ceph_sync_read()
In two `break` statements, the call to ceph_release_page_vector() was
missing, leaking the allocation from ceph_alloc_page_vector().

Instead of adding the missing ceph_release_page_vector() calls, the
Ceph maintainers preferred to transfer page ownership to the
`ceph_osd_request` by passing `own_pages=true` to
osd_req_op_extent_osd_data_pages().  This requires postponing the
ceph_osdc_put_request() call until after the block that accesses the
`pages`.

Cc: stable@vger.kernel.org
Fixes: 03bc06c7b0bd ("ceph: add new mount option to enable sparse reads")
Fixes: f0fe1e54cfcf ("ceph: plumb in decryption during reads")
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-12-16 23:25:43 +01:00
..
2024-11-01 07:37:10 -10:00
2024-12-10 18:18:01 -08:00
2024-07-15 11:14:59 -07:00
2024-11-26 13:39:02 -08:00
2024-11-25 17:08:27 +09:00
2024-09-16 09:14:02 +02:00
2024-11-26 12:50:58 -08:00
2024-10-17 00:28:06 -07:00
2024-11-27 13:11:58 -08:00
2024-11-26 12:34:50 -08:00
2024-11-18 09:35:30 -08:00
2024-11-26 18:15:06 +01:00
2024-12-05 12:31:40 +01:00
2024-11-26 12:59:30 -08:00
2024-11-30 10:17:53 -08:00
2024-11-26 12:59:30 -08:00
\n
2024-11-21 09:55:45 -08:00
2024-11-22 20:55:42 -08:00
2024-05-28 11:52:53 +02:00
2024-08-21 22:32:58 +02:00
2024-10-02 12:02:15 -07:00
2024-11-03 01:28:06 -05:00
2024-11-21 08:28:08 -08:00
2024-11-26 13:26:15 -08:00
2024-11-18 10:30:29 -08:00
2024-11-18 10:45:06 -08:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:06 -05:00
2024-10-21 16:29:38 +02:00
2024-11-03 01:28:06 -05:00
2024-10-21 16:29:38 +02:00
2024-09-24 15:29:42 -07:00
2024-09-16 11:15:26 +02:00
2024-09-27 08:18:43 -07:00
\n
2024-11-21 09:55:45 -08:00
2024-10-24 13:54:51 +02:00
2024-09-27 08:18:43 -07:00
2024-11-03 01:28:07 -05:00
2024-11-03 01:28:07 -05:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:06 -05:00