linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: Fix extent map leak in find_first_block_group
@ 2016-08-24  4:13 Qu Wenruo
  2016-08-24  8:54 ` Filipe Manana
  0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2016-08-24  4:13 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Liu Bo

The following commit introduced the extent map leak:
commit 6fb37b756acce6d6e045f79c3764206033f617b4
Author: Liu Bo <bo.li.liu@oracle.com>
Date:   Wed Jun 22 18:31:27 2016 -0700

    Btrfs: check inconsistence between chunk and block group

This leads to slab warning at rmmod time.

Cc: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 fs/btrfs/extent-tree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index c2b81b0..e621823 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -9905,6 +9905,7 @@ static int find_first_block_group(struct btrfs_root *root,
 				ret = -ENOENT;
 			} else {
 				ret = 0;
+				free_extent_map(em);
 			}
 			goto out;
 		}
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-24 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24  4:13 [PATCH] btrfs: Fix extent map leak in find_first_block_group Qu Wenruo
2016-08-24  8:54 ` Filipe Manana
2016-08-24 18:24   ` Liu Bo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).