# Re: \[PATCH 02/13\] nvme-multipath: add error handling support for add\_disk()

- From: Chaitanya Kulkarni \<hidden\>
- Date: 2021-10-18 05:34:19 
- List: linux-block
- Page: https://ratatoskr.run/linux-block/2021/10/1544913
- Thread: https://ratatoskr.run/linux-block/2021/10/1543973/t.md

```text
On 10/15/21 16:52, Luis Chamberlain wrote:
> We never checked for errors on add_disk() as this function
> returned void. Now that this is fixed, use the shiny new
> error handling.
> 
> Since we now can tell for sure when a disk was added, move
> setting the bit NVME_NSHEAD_DISK_LIVE only when we did
> add the disk successfully.
> 
> Nothing to do here as the cleanup is done elsewhere. We take
> care and use test_and_set_bit() because it is protects against
> two nvme paths simultaneously calling device_add_disk() on the
> same namespace head.
> 
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>



```
