btrfs: fix unpaired compr folio allocation/freeing
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: fix the incorrect freeing of a compression folio in btrfs_submit_compressed_read()fs/ | +1 | 0 replies | |
| 2/2 | btrfs: fix the incorrect freeing of a compression folio in btrfs_do_encoded_write()fs/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] btrfs: fix unpaired compr folio allocation/freeing
With the recent *_compressed_bio() rework, we're using compressed_bio everywhere for reads/writes (including regular and encoded).
However this requires us to allocate/free folios using btrfs_alloc_compr_folio() and btrfs_free_compr_folio().
Not using the later to release a folio allocated by btrfs_alloc_compr_folio() can screw up the LRU list.
Fix the unpaired calls as a hot fix.
For the long run, I'd like to remove btrfs_(alloc|free)_compr_folios() with regular folio_(alloc|put)() instead.
As I do not think the compr pool is that helpful compared to the extra maintanance needed.
Qu Wenruo (2):
btrfs: fix the incorrect freeing of a compression folio in
btrfs_submit_compressed_read()
btrfs: fix the incorrect freeing of a compression folio in
btrfs_do_encoded_write()
fs/btrfs/compression.c | 2 +- fs/btrfs/inode.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.53.0