block: remove blk_free_devt in add_partition
PATCH 1/1 block: remove blk_free_devt in add_partition
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 <[email protected]>
--- block/partition-generic.c | 1 - 1 file changed, 1 deletion(-)
block/partition-generic.c +0 -1
@@ -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); }
Signature · 1 line
2.9.4
Quoted 23 lines · weiping zhang
put_device(pdev)will callpdev->type->releasefinally, andblk_free_devthas been called inpart_release(), so remove it.Signed-off-by weiping zhang <[email protected]>--- block/partition-generic.c | 1 - 1 file changed, 1 deletion(-)block/partition-generic.c +0
-1@@ -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); }Signature · 1 line
2.9.4
Hi Jens,
would you please look this trivial patch at your convenience?
Thanks
Jens Axboe
maintainerQuoted 2 lines · weiping zhang
put_device(pdev)will callpdev->type->releasefinally, andblk_free_devthas been called inpart_release(), so remove it.
Your analysis looks correct to me, applied for 4.14.
Signature · 1 line
Jens Axboe
Quoted 11 lines · Jens Axboe <[email protected]>于2017年8月24日 周四22:27写道:
Quoted 2 lines · weiping zhang
put_device(pdev)will callpdev->type->releasefinally, andblk_free_devthas been called inpart_release(), so remove it.Your analysis looks correct to me, applied for 4.14.
--
Jens Axboe
Thanks a ton