Skip to contentSkip to conversation

Btrfs: fix typo of variable in scrub_stripe

PATCH In review Tsutomu Itoh 4 participants 4 messages Jan 9, 2015 – Jan 16, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: fix typo of variable in scrub_stripe

The address that should be freed is not 'ppath' but 'path'.

---
 fs/btrfs/scrub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/scrub.c +1 -1
index f2bb13a..403fbdb 100644
@@ -3053,7 +3053,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
 
 	ppath = btrfs_alloc_path();
 	if (!ppath) {
-		btrfs_free_path(ppath);
+		btrfs_free_path(path);
 		return -ENOMEM;
 	}
 
Signature · 1 line
2.2.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Tsutomu Itoh

The address that should be freed is not 'ppath' but 'path'.

---
 fs/btrfs/scrub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/scrub.c +0 -0
index f2bb13a..403fbdb 100644

fs/btrfs/scrub.c static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx, · line 3056

Quoted 5 lines
fs/btrfs/scrub.c +1 -1
@@ -3053,7 +3053,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
 
 	ppath = btrfs_alloc_path();
 	if (!ppath) {
-		btrfs_free_path(ppath);
+		btrfs_free_path(path);

My bad. Thanks to fix it.

Quoted 4 lines
fs/btrfs/scrub.c +0 -0
 		return -ENOMEM;
 	}
 
#3 lore raw
Quoted 7 lines · David Sterba
Quoted 3 lines · Tsutomu Itoh

The address that should be freed is not 'ppath' but 'path'.

Chris, please add this patch to the next 3.19-rc, the code has been introduced during this merge window.

Yes, I've got it queued up here, along with Filipe's v2 from today and a few others.

-chris