mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
btrfs: fix folio refcount in __alloc_dummy_extent_buffer()
Another improper use of __folio_put() in an error path after freshly
allocating pages/folios which returns them with the refcount initialized
to 1. The refactor from __free_pages() -> __folio_put() (instead of
folio_put) removed a refcount decrement found in __free_pages() and
folio_put but absent from __folio_put().
Fixes: 13df3775ef
("btrfs: cleanup metadata page pointer usage")
CC: stable@vger.kernel.org # 6.8+
Tested-by: Ed Tomlinson <edtoml@gmail.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
da0386c1c7
commit
a56c85fa2d
@ -3553,7 +3553,7 @@ err:
|
||||
for (int i = 0; i < num_folios; i++) {
|
||||
if (eb->folios[i]) {
|
||||
detach_extent_buffer_folio(eb, eb->folios[i]);
|
||||
__folio_put(eb->folios[i]);
|
||||
folio_put(eb->folios[i]);
|
||||
}
|
||||
}
|
||||
__free_extent_buffer(eb);
|
||||
|
Loading…
Reference in New Issue
Block a user