diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-04-18 08:55:34 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-04-18 08:55:34 -0400 |
commit | f65647c29b14f5a32ff6f3237b0ef3b375ed5a79 (patch) | |
tree | 4ec6b2a20d37f5ce4098cf77f3eb9606e3f241ba /fs/btrfs/free-space-cache.c | |
parent | 6d74119f1a3efad9dc7f79a16c201242324b731f (diff) |
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>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index a3f420def0e9..11d2e9cea09e 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -732,7 +732,7 @@ int btrfs_write_out_cache(struct btrfs_root *root, | |||
732 | out_of_space = true; | 732 | out_of_space = true; |
733 | break; | 733 | break; |
734 | } | 734 | } |
735 | page = find_get_page(inode->i_mapping, index); | 735 | page = pages[index]; |
736 | 736 | ||
737 | addr = kmap(page); | 737 | addr = kmap(page); |
738 | memcpy(addr, entry->bitmap, PAGE_CACHE_SIZE); | 738 | memcpy(addr, entry->bitmap, PAGE_CACHE_SIZE); |