[PATCH] block: remove blk_free_devt in add_partition

Subsystems: block layer, the rest

STALE3309d

4 messages, 3 authors, 2017-08-24 · open the first message on its own page

[PATCH] block: remove blk_free_devt in add_partition

From: weiping zhang <hidden>
Date: 2017-08-18 15:54:46

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

Re: [PATCH] block: remove blk_free_devt in add_partition

From: weiping zhang <hidden>
Date: 2017-08-24 12:08:30

On Fri, Aug 18, 2017 at 11:54:45PM +0800, weiping zhang wrote:
quoted hunk
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 <redacted>
---
 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

Re: [PATCH] block: remove blk_free_devt in add_partition

From: Jens Axboe <axboe@kernel.dk>
Date: 2017-08-24 14:27:25

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

Re: [PATCH] block: remove blk_free_devt in add_partition

From: weiping zhang <hidden>
Date: 2017-08-24 14:31:17

Jens Axboe [off-list ref]于2017年8月24日 周四22:27写道:
On 08/18/2017 09:54 AM, weiping zhang wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help