* [PATCH] Btrfs: fix em leak in find_first_block_group
@ 2016-08-18 19:30 Josef Bacik
2016-08-19 17:31 ` Omar Sandoval
2016-08-24 18:24 ` Liu Bo
0 siblings, 2 replies; 4+ messages in thread
From: Josef Bacik @ 2016-08-18 19:30 UTC (permalink / raw)
To: linux-btrfs
We need to call free_extent_map() on the em we look up.Btrfs: fix em leak in
find_first_block_group
We need to call free_extent_map() on the em we look up.
Signed-off-by: Josef Bacik <jbacik@fb.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 61b494e..20f9fa6 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -9906,6 +9906,7 @@ static int find_first_block_group(struct btrfs_root *root,
} else {
ret = 0;
}
+ free_extent_map(em);
goto out;
}
path->slots[0]++;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: fix em leak in find_first_block_group
2016-08-18 19:30 [PATCH] Btrfs: fix em leak in find_first_block_group Josef Bacik
@ 2016-08-19 17:31 ` Omar Sandoval
2016-08-23 11:41 ` David Sterba
2016-08-24 18:24 ` Liu Bo
1 sibling, 1 reply; 4+ messages in thread
From: Omar Sandoval @ 2016-08-19 17:31 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs
On Thu, Aug 18, 2016 at 03:30:06PM -0400, Josef Bacik wrote:
> We need to call free_extent_map() on the em we look up.Btrfs: fix em leak in
> find_first_block_group
Something weird happened with your patch here ^^^
> We need to call free_extent_map() on the em we look up.
>
> Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Omar Sandoval <osandov@fb.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 61b494e..20f9fa6 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -9906,6 +9906,7 @@ static int find_first_block_group(struct btrfs_root *root,
> } else {
> ret = 0;
> }
> + free_extent_map(em);
> goto out;
> }
> path->slots[0]++;
> --
> 1.8.3.1
--
Omar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: fix em leak in find_first_block_group
2016-08-19 17:31 ` Omar Sandoval
@ 2016-08-23 11:41 ` David Sterba
0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2016-08-23 11:41 UTC (permalink / raw)
To: Omar Sandoval; +Cc: Josef Bacik, linux-btrfs
On Fri, Aug 19, 2016 at 10:31:53AM -0700, Omar Sandoval wrote:
> On Thu, Aug 18, 2016 at 03:30:06PM -0400, Josef Bacik wrote:
> > We need to call free_extent_map() on the em we look up.Btrfs: fix em leak in
> > find_first_block_group
>
> Something weird happened with your patch here ^^^
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: fix em leak in find_first_block_group
2016-08-18 19:30 [PATCH] Btrfs: fix em leak in find_first_block_group Josef Bacik
2016-08-19 17:31 ` Omar Sandoval
@ 2016-08-24 18:24 ` Liu Bo
1 sibling, 0 replies; 4+ messages in thread
From: Liu Bo @ 2016-08-24 18:24 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs
On Thu, Aug 18, 2016 at 03:30:06PM -0400, Josef Bacik wrote:
> We need to call free_extent_map() on the em we look up.Btrfs: fix em leak in
> find_first_block_group
>
> We need to call free_extent_map() on the em we look up.
Thanks for fixing it.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: Josef Bacik <jbacik@fb.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 61b494e..20f9fa6 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -9906,6 +9906,7 @@ static int find_first_block_group(struct btrfs_root *root,
> } else {
> ret = 0;
> }
> + free_extent_map(em);
> goto out;
> }
> path->slots[0]++;
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-24 18:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 19:30 [PATCH] Btrfs: fix em leak in find_first_block_group Josef Bacik
2016-08-19 17:31 ` Omar Sandoval
2016-08-23 11:41 ` David Sterba
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).