Commit f65647c29b14f5a32ff6f3237b0ef3b375ed5a79

Authored by Chris Mason
1 parent 6d74119f1a

Btrfs: fix free space cache leak

The free space caching code was recently reworked to
cache all the pages it needed instead of using find_get_page everywhere.

One loop was missed though, so it ended up leaking pages.  This fixes
it to use our page array instead of find_get_page.

Signed-off-by: Chris Mason <chris.mason@oracle.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

fs/btrfs/free-space-cache.c
... ... @@ -732,7 +732,7 @@
732 732 out_of_space = true;
733 733 break;
734 734 }
735   - page = find_get_page(inode->i_mapping, index);
  735 + page = pages[index];
736 736  
737 737 addr = kmap(page);
738 738 memcpy(addr, entry->bitmap, PAGE_CACHE_SIZE);