Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f65647c2 authored by Chris Mason's avatar Chris Mason
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);