diff mbox

Btrfs: fix typo of variable in scrub_stripe

Message ID 201501090837.AA00007@WIN-R1VKH1IH438.jp.fujitsu.com (mailing list archive)
State Under Review
Headers show

Commit Message

Tsutomu Itoh Jan. 9, 2015, 8:37 a.m. UTC
The address that should be freed is not 'ppath' but 'path'.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> 
---
 fs/btrfs/scrub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

miaoxie (A) Jan. 9, 2015, 8:44 a.m. UTC | #1
On Fri, 09 Jan 2015 17:37:52 +0900, Tsutomu Itoh wrote:
> The address that should be freed is not 'ppath' but 'path'.
> 
> Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> 
> ---
>  fs/btrfs/scrub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index f2bb13a..403fbdb 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -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.

Reviewed-by: Miao Xie <miaoxie@huawei.com>

>  		return -ENOMEM;
>  	}
>  
> 

--
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
David Sterba Jan. 16, 2015, 10:51 a.m. UTC | #2
On Fri, Jan 09, 2015 at 05:37:52PM +0900, Tsutomu Itoh wrote:
> The address that should be freed is not 'ppath' but 'path'.
> 
> Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> 

Chris, please add this patch to the next 3.19-rc, the code has been
introduced during this merge window.
--
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
Chris Mason Jan. 16, 2015, 1:27 p.m. UTC | #3
On Fri, Jan 16, 2015 at 5:51 AM, David Sterba <dsterba@suse.cz> wrote:
> On Fri, Jan 09, 2015 at 05:37:52PM +0900, Tsutomu Itoh wrote:
>>  The address that should be freed is not 'ppath' but 'path'.
>> 
>>  Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
> 
> 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



--
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
diff mbox

Patch

diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index f2bb13a..403fbdb 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -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;
 	}