]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: btrfs_release_extent_buffer_page didn't free pages of dummy extent
authorForrest Liu <forrestl@synology.com>
Mon, 9 Feb 2015 09:31:45 +0000 (17:31 +0800)
committerChris Mason <clm@fb.com>
Wed, 29 Apr 2015 20:22:09 +0000 (13:22 -0700)
commit5d2361db48899789fb466ff62db5d5fc7b070e86
treeccc1158ccc22b0ba31a44ec20f11e08682995ca1
parent6e17d30bfaf43e04d991392d8484f1c556810c33
Btrfs: btrfs_release_extent_buffer_page didn't free pages of dummy extent

btrfs_release_extent_buffer_page() can't handle dummy extent that
allocated by btrfs_clone_extent_buffer() properly. That is because
reference count of pages that allocated by btrfs_clone_extent_buffer()
was 2, 1 by alloc_page(), and another by attach_extent_buffer_page().

Running following command repeatly can check this memory leak problem

    btrfs inspect-internal inode-resolve 256 /mnt/btrfs

Signed-off-by: Chien-Kuan Yeh <ckya@synology.com>
Signed-off-by: Forrest Liu <forrestl@synology.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Tested-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent_io.c