* [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 19:43 ` Christophe JAILLET
0 siblings, 0 replies; 18+ messages in thread
From: Christophe JAILLET @ 2017-09-11 19:43 UTC (permalink / raw)
To: axboe, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors, Christophe JAILLET
If the 'kmalloc' fails, we must go through the existing error handling
path.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
mm/backing-dev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index f028a9a472fd..e19606bb41a0 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -569,8 +569,10 @@ static int cgwb_create(struct backing_dev_info *bdi,
/* need to create a new one */
wb = kmalloc(sizeof(*wb), gfp);
- if (!wb)
- return -ENOMEM;
+ if (!wb) {
+ ret = -ENOMEM;
+ goto out_put;
+ }
ret = wb_init(wb, bdi, blkcg_css->id, gfp);
if (ret)
--
2.11.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 19:43 ` Christophe JAILLET
0 siblings, 0 replies; 18+ messages in thread
From: Christophe JAILLET @ 2017-09-11 19:43 UTC (permalink / raw)
To: axboe, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors, Christophe JAILLET
If the 'kmalloc' fails, we must go through the existing error handling
path.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
mm/backing-dev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index f028a9a472fd..e19606bb41a0 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -569,8 +569,10 @@ static int cgwb_create(struct backing_dev_info *bdi,
/* need to create a new one */
wb = kmalloc(sizeof(*wb), gfp);
- if (!wb)
- return -ENOMEM;
+ if (!wb) {
+ ret = -ENOMEM;
+ goto out_put;
+ }
ret = wb_init(wb, bdi, blkcg_css->id, gfp);
if (ret)
--
2.11.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 19:43 ` Christophe JAILLET
0 siblings, 0 replies; 18+ messages in thread
From: Christophe JAILLET @ 2017-09-11 19:43 UTC (permalink / raw)
To: axboe, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors, Christophe JAILLET
If the 'kmalloc' fails, we must go through the existing error handling
path.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
mm/backing-dev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index f028a9a472fd..e19606bb41a0 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -569,8 +569,10 @@ static int cgwb_create(struct backing_dev_info *bdi,
/* need to create a new one */
wb = kmalloc(sizeof(*wb), gfp);
- if (!wb)
- return -ENOMEM;
+ if (!wb) {
+ ret = -ENOMEM;
+ goto out_put;
+ }
ret = wb_init(wb, bdi, blkcg_css->id, gfp);
if (ret)
--
2.11.0
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
2017-09-11 19:43 ` Christophe JAILLET
(?)
@ 2017-09-11 19:52 ` Jens Axboe
-1 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 19:52 UTC (permalink / raw)
To: Christophe JAILLET, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
> If the 'kmalloc' fails, we must go through the existing error handling
> path.
Looks good to me, probably wants a
Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
line as well.
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 19:52 ` Jens Axboe
0 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 19:52 UTC (permalink / raw)
To: Christophe JAILLET, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
> If the 'kmalloc' fails, we must go through the existing error handling
> path.
Looks good to me, probably wants a
Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
line as well.
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 19:52 ` Jens Axboe
0 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 19:52 UTC (permalink / raw)
To: Christophe JAILLET, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
> If the 'kmalloc' fails, we must go through the existing error handling
> path.
Looks good to me, probably wants a
Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
line as well.
--
Jens Axboe
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
2017-09-11 19:52 ` Jens Axboe
(?)
@ 2017-09-11 20:04 ` Christophe JAILLET
-1 siblings, 0 replies; 18+ messages in thread
From: Christophe JAILLET @ 2017-09-11 20:04 UTC (permalink / raw)
To: Jens Axboe, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
Le 11/09/2017 à 21:52, Jens Axboe a écrit :
> On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
>> If the 'kmalloc' fails, we must go through the existing error handling
>> path.
> Looks good to me, probably wants a
>
> Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
>
> line as well.
>
Hi,
do you want me to resend with the Fixes tag? Or will it be added if merged?
CJ
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:04 ` Christophe JAILLET
0 siblings, 0 replies; 18+ messages in thread
From: Christophe JAILLET @ 2017-09-11 20:04 UTC (permalink / raw)
To: Jens Axboe, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
Le 11/09/2017 à 21:52, Jens Axboe a écrit :
> On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
>> If the 'kmalloc' fails, we must go through the existing error handling
>> path.
> Looks good to me, probably wants a
>
> Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
>
> line as well.
>
Hi,
do you want me to resend with the Fixes tag? Or will it be added if merged?
CJ
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:04 ` Christophe JAILLET
0 siblings, 0 replies; 18+ messages in thread
From: Christophe JAILLET @ 2017-09-11 20:04 UTC (permalink / raw)
To: Jens Axboe, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
Le 11/09/2017 A 21:52, Jens Axboe a A(C)critA :
> On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
>> If the 'kmalloc' fails, we must go through the existing error handling
>> path.
> Looks good to me, probably wants a
>
> Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
>
> line as well.
>
Hi,
do you want me to resend with the Fixes tag? Or will it be added if merged?
CJ
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
2017-09-11 20:04 ` Christophe JAILLET
(?)
@ 2017-09-11 20:07 ` Jens Axboe
-1 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 20:07 UTC (permalink / raw)
To: Christophe JAILLET, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 02:04 PM, Christophe JAILLET wrote:
> Le 11/09/2017 à 21:52, Jens Axboe a écrit :
>> On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
>>> If the 'kmalloc' fails, we must go through the existing error handling
>>> path.
>> Looks good to me, probably wants a
>>
>> Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
>>
>> line as well.
>>
> Hi,
>
> do you want me to resend with the Fixes tag? Or will it be added if merged?
Shouldn't be necessary to resend. Not sure who will queue it up, mm/ always
ends up being somewhat of a no-mans-land :-)
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:07 ` Jens Axboe
0 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 20:07 UTC (permalink / raw)
To: Christophe JAILLET, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 02:04 PM, Christophe JAILLET wrote:
> Le 11/09/2017 à 21:52, Jens Axboe a écrit :
>> On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
>>> If the 'kmalloc' fails, we must go through the existing error handling
>>> path.
>> Looks good to me, probably wants a
>>
>> Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
>>
>> line as well.
>>
> Hi,
>
> do you want me to resend with the Fixes tag? Or will it be added if merged?
Shouldn't be necessary to resend. Not sure who will queue it up, mm/ always
ends up being somewhat of a no-mans-land :-)
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:07 ` Jens Axboe
0 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 20:07 UTC (permalink / raw)
To: Christophe JAILLET, jack, tj, geliangtang, akpm
Cc: linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 02:04 PM, Christophe JAILLET wrote:
> Le 11/09/2017 A 21:52, Jens Axboe a A(C)crit :
>> On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
>>> If the 'kmalloc' fails, we must go through the existing error handling
>>> path.
>> Looks good to me, probably wants a
>>
>> Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
>>
>> line as well.
>>
> Hi,
>
> do you want me to resend with the Fixes tag? Or will it be added if merged?
Shouldn't be necessary to resend. Not sure who will queue it up, mm/ always
ends up being somewhat of a no-mans-land :-)
--
Jens Axboe
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
2017-09-11 19:43 ` Christophe JAILLET
(?)
@ 2017-09-11 20:15 ` Jan Kara
-1 siblings, 0 replies; 18+ messages in thread
From: Jan Kara @ 2017-09-11 20:15 UTC (permalink / raw)
To: Christophe JAILLET
Cc: axboe, jack, tj, geliangtang, akpm, linux-mm, linux-kernel,
kernel-janitors
On Mon 11-09-17 21:43:23, Christophe JAILLET wrote:
> If the 'kmalloc' fails, we must go through the existing error handling
> path.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> mm/backing-dev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index f028a9a472fd..e19606bb41a0 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -569,8 +569,10 @@ static int cgwb_create(struct backing_dev_info *bdi,
>
> /* need to create a new one */
> wb = kmalloc(sizeof(*wb), gfp);
> - if (!wb)
> - return -ENOMEM;
> + if (!wb) {
> + ret = -ENOMEM;
> + goto out_put;
> + }
>
> ret = wb_init(wb, bdi, blkcg_css->id, gfp);
> if (ret)
> --
> 2.11.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:15 ` Jan Kara
0 siblings, 0 replies; 18+ messages in thread
From: Jan Kara @ 2017-09-11 20:15 UTC (permalink / raw)
To: Christophe JAILLET
Cc: axboe, jack, tj, geliangtang, akpm, linux-mm, linux-kernel,
kernel-janitors
On Mon 11-09-17 21:43:23, Christophe JAILLET wrote:
> If the 'kmalloc' fails, we must go through the existing error handling
> path.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> mm/backing-dev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index f028a9a472fd..e19606bb41a0 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -569,8 +569,10 @@ static int cgwb_create(struct backing_dev_info *bdi,
>
> /* need to create a new one */
> wb = kmalloc(sizeof(*wb), gfp);
> - if (!wb)
> - return -ENOMEM;
> + if (!wb) {
> + ret = -ENOMEM;
> + goto out_put;
> + }
>
> ret = wb_init(wb, bdi, blkcg_css->id, gfp);
> if (ret)
> --
> 2.11.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:15 ` Jan Kara
0 siblings, 0 replies; 18+ messages in thread
From: Jan Kara @ 2017-09-11 20:15 UTC (permalink / raw)
To: Christophe JAILLET
Cc: axboe, jack, tj, geliangtang, akpm, linux-mm, linux-kernel,
kernel-janitors
On Mon 11-09-17 21:43:23, Christophe JAILLET wrote:
> If the 'kmalloc' fails, we must go through the existing error handling
> path.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> mm/backing-dev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index f028a9a472fd..e19606bb41a0 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -569,8 +569,10 @@ static int cgwb_create(struct backing_dev_info *bdi,
>
> /* need to create a new one */
> wb = kmalloc(sizeof(*wb), gfp);
> - if (!wb)
> - return -ENOMEM;
> + if (!wb) {
> + ret = -ENOMEM;
> + goto out_put;
> + }
>
> ret = wb_init(wb, bdi, blkcg_css->id, gfp);
> if (ret)
> --
> 2.11.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
2017-09-11 20:15 ` Jan Kara
(?)
@ 2017-09-11 20:17 ` Jens Axboe
-1 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 20:17 UTC (permalink / raw)
To: Jan Kara, Christophe JAILLET
Cc: tj, geliangtang, akpm, linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 02:15 PM, Jan Kara wrote:
> On Mon 11-09-17 21:43:23, Christophe JAILLET wrote:
>> If the 'kmalloc' fails, we must go through the existing error handling
>> path.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> Looks good to me. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
I'll queue it up, with your reviewed-by added. Thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:17 ` Jens Axboe
0 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 20:17 UTC (permalink / raw)
To: Jan Kara, Christophe JAILLET
Cc: tj, geliangtang, akpm, linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 02:15 PM, Jan Kara wrote:
> On Mon 11-09-17 21:43:23, Christophe JAILLET wrote:
>> If the 'kmalloc' fails, we must go through the existing error handling
>> path.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> Looks good to me. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
I'll queue it up, with your reviewed-by added. Thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
@ 2017-09-11 20:17 ` Jens Axboe
0 siblings, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2017-09-11 20:17 UTC (permalink / raw)
To: Jan Kara, Christophe JAILLET
Cc: tj, geliangtang, akpm, linux-mm, linux-kernel, kernel-janitors
On 09/11/2017 02:15 PM, Jan Kara wrote:
> On Mon 11-09-17 21:43:23, Christophe JAILLET wrote:
>> If the 'kmalloc' fails, we must go through the existing error handling
>> path.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> Looks good to me. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
I'll queue it up, with your reviewed-by added. Thanks.
--
Jens Axboe
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2017-09-11 20:17 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11 19:43 [PATCH] mm/backing-dev.c: fix an error handling path in 'cgwb_create()' Christophe JAILLET
2017-09-11 19:43 ` Christophe JAILLET
2017-09-11 19:43 ` Christophe JAILLET
2017-09-11 19:52 ` Jens Axboe
2017-09-11 19:52 ` Jens Axboe
2017-09-11 19:52 ` Jens Axboe
2017-09-11 20:04 ` Christophe JAILLET
2017-09-11 20:04 ` Christophe JAILLET
2017-09-11 20:04 ` Christophe JAILLET
2017-09-11 20:07 ` Jens Axboe
2017-09-11 20:07 ` Jens Axboe
2017-09-11 20:07 ` Jens Axboe
2017-09-11 20:15 ` Jan Kara
2017-09-11 20:15 ` Jan Kara
2017-09-11 20:15 ` Jan Kara
2017-09-11 20:17 ` Jens Axboe
2017-09-11 20:17 ` Jens Axboe
2017-09-11 20:17 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.