[PATCH 1/2] nvme-core: remove redundant condition in nvme_ns_head_multipath

Christoph Hellwig hch at lst.de
Fri May 19 21:24:13 PDT 2023


On Thu, May 18, 2023 at 08:12:23PM -0600, Jens Axboe wrote:
> >  static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head)
> >  {
> > -	return IS_ENABLED(CONFIG_NVME_MULTIPATH) && head->disk;
> > +	return head->disk;
> >  }
> 
> Might not matter for this case, but this changes something that'd
> compile away for !CONFIG_NVME_MULTIPATH to now needing to read
> disk->head instead. That doesn't seem like a good change.

Exactly.  That's the reason why this helper and check exist.



More information about the Linux-nvme mailing list