Commit f65647c2 authored by Chris Mason's avatar Chris Mason

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: default avatarChris Mason <chris.mason@oracle.com>
parent 6d74119f
......@@ -732,7 +732,7 @@ int btrfs_write_out_cache(struct btrfs_root *root,
out_of_space = true;
break;
}
page = find_get_page(inode->i_mapping, index);
page = pages[index];
addr = kmap(page);
memcpy(addr, entry->bitmap, PAGE_CACHE_SIZE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment