All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: remove blk_free_devt in add_partition
@ 2017-08-18 15:54 weiping zhang
  2017-08-24 12:08 ` weiping zhang
  2017-08-24 14:27 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: weiping zhang @ 2017-08-18 15:54 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

put_device(pdev) will call pdev->type->release finally, and blk_free_devt
has been called in part_release(), so remove it.

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
---
 block/partition-generic.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/block/partition-generic.c b/block/partition-generic.c
index c5ec824..04d82dd 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -391,7 +391,6 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
 	device_del(pdev);
 out_put:
 	put_device(pdev);
-	blk_free_devt(devt);
 	return ERR_PTR(err);
 }
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: remove blk_free_devt in add_partition
  2017-08-18 15:54 [PATCH] block: remove blk_free_devt in add_partition weiping zhang
@ 2017-08-24 12:08 ` weiping zhang
  2017-08-24 14:27 ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: weiping zhang @ 2017-08-24 12:08 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

On Fri, Aug 18, 2017 at 11:54:45PM +0800, weiping zhang wrote:
> put_device(pdev) will call pdev->type->release finally, and blk_free_devt
> has been called in part_release(), so remove it.
> 
> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
> ---
>  block/partition-generic.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/block/partition-generic.c b/block/partition-generic.c
> index c5ec824..04d82dd 100644
> --- a/block/partition-generic.c
> +++ b/block/partition-generic.c
> @@ -391,7 +391,6 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
>  	device_del(pdev);
>  out_put:
>  	put_device(pdev);
> -	blk_free_devt(devt);
>  	return ERR_PTR(err);
>  }
>  
> -- 
> 2.9.4
> 

Hi Jens,

would you please look this trivial patch at your convenience?

Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: remove blk_free_devt in add_partition
  2017-08-18 15:54 [PATCH] block: remove blk_free_devt in add_partition weiping zhang
  2017-08-24 12:08 ` weiping zhang
@ 2017-08-24 14:27 ` Jens Axboe
  2017-08-24 14:31   ` weiping zhang
  1 sibling, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2017-08-24 14:27 UTC (permalink / raw)
  To: linux-block

On 08/18/2017 09:54 AM, weiping zhang wrote:
> put_device(pdev) will call pdev->type->release finally, and blk_free_devt
> has been called in part_release(), so remove it.

Your analysis looks correct to me, applied for 4.14.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] block: remove blk_free_devt in add_partition
  2017-08-24 14:27 ` Jens Axboe
@ 2017-08-24 14:31   ` weiping zhang
  0 siblings, 0 replies; 4+ messages in thread
From: weiping zhang @ 2017-08-24 14:31 UTC (permalink / raw)
  To: Jens Axboe, linux-block

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Jens Axboe <axboe@kernel.dk>于2017年8月24日 周四22:27写道:

> On 08/18/2017 09:54 AM, weiping zhang wrote:
> > put_device(pdev) will call pdev->type->release finally, and blk_free_devt
> > has been called in part_release(), so remove it.
>
> Your analysis looks correct to me, applied for 4.14.
>
> --
> Jens Axboe
>

>
Thanks a ton

[-- Attachment #2: Type: text/html, Size: 889 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-24 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-18 15:54 [PATCH] block: remove blk_free_devt in add_partition weiping zhang
2017-08-24 12:08 ` weiping zhang
2017-08-24 14:27 ` Jens Axboe
2017-08-24 14:31   ` weiping zhang

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.