Skip to contentSkip to conversation

Btrfs: fix em leak in find_first_block_group

PATCH In review Josef Bacik 4 participants 4 messages Aug 19, 2016 – Aug 24, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: fix em leak in find_first_block_group

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.

---
 fs/btrfs/extent-tree.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/extent-tree.c +1 -0
index 61b494e..20f9fa6 100644
@@ -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]++;
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Josef Bacik

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 ^^^

Quoted 3 lines

We need to call free_extent_map() on the em we look up.

Quoted 18 lines
---
 fs/btrfs/extent-tree.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/extent-tree.c +1 -0
index 61b494e..20f9fa6 100644
@@ -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]++;
Signature · 1 line
1.8.3.1
Signature · 1 line
Omar
#2 lore raw
Quoted 5 lines · Omar Sandoval
Quoted 2 lines · Josef Bacik

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.

Reviewed-by on v1 1/1
#3 lore raw
In reply to Josef Bacik
Quoted 4 lines · Josef Bacik

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.

Thanks,

-liubo

Quoted 25 lines
---
 fs/btrfs/extent-tree.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/extent-tree.c +1 -0
index 61b494e..20f9fa6 100644
@@ -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]++;
Signature · 6 lines
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html