Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-03 Thread Luis Chamberlain
On Tue, Nov 02, 2021 at 07:28:02PM -0600, Jens Axboe wrote: > On 11/2/21 6:49 PM, Dan Williams wrote: > > On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain wrote: > >> > >> On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > >>> On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain > >>> wr

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-03 Thread Luis Chamberlain
On Tue, Nov 02, 2021 at 05:49:12PM -0700, Dan Williams wrote: > On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain wrote: > > > > On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > > > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain > > > wrote: > > > > > > > > If nd_integrity_init()

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-02 Thread Jens Axboe
On 11/2/21 6:49 PM, Dan Williams wrote: > On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain wrote: >> >> On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: >>> On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: If nd_integrity_init() fails we'd get del_gendisk() called, >>

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-02 Thread Dan Williams
On Tue, Nov 2, 2021 at 5:10 PM Luis Chamberlain wrote: > > On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > > > > > If nd_integrity_init() fails we'd get del_gendisk() called, > > > but that's not correct as we should on

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-11-02 Thread Luis Chamberlain
On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > > > If nd_integrity_init() fails we'd get del_gendisk() called, > > but that's not correct as we should only call that if we're > > done with device_add_disk(). Fix this by p

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-10-19 Thread Luis Chamberlain
On Fri, Oct 15, 2021 at 05:13:48PM -0700, Dan Williams wrote: > On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > > > If nd_integrity_init() fails we'd get del_gendisk() called, > > but that's not correct as we should only call that if we're > > done with device_add_disk(). Fix this by p

Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-10-15 Thread Dan Williams
On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > If nd_integrity_init() fails we'd get del_gendisk() called, > but that's not correct as we should only call that if we're > done with device_add_disk(). Fix this by providing unwinding > prior to the devm call being registered and moving

[PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures

2021-10-15 Thread Luis Chamberlain
If nd_integrity_init() fails we'd get del_gendisk() called, but that's not correct as we should only call that if we're done with device_add_disk(). Fix this by providing unwinding prior to the devm call being registered and moving the devm registration to the very end. This should fix calling del