[PATCH] nvme: move protection information check into nvme_setup_rw

Christoph Hellwig hch at lst.de
Tue Jun 13 01:03:00 PDT 2017


On Tue, Jun 13, 2017 at 10:00:23AM +0200, Johannes Thumshirn wrote:
> > @@ -386,6 +395,7 @@ static inline void nvme_setup_rw(struct nvme_ns *ns, struct request *req,
> >  
> >  	cmnd->rw.control = cpu_to_le16(control);
> >  	cmnd->rw.dsmgmt = cpu_to_le32(dsmgmt);
> > +	return 0;
> >  }
> 
> And here you're returning 0 instead of BLK_STATUS_OK.
> 
> Intentional?

Yes, at least sort of.  Even for __bitwise types 0 is special, so
this is perfectly fine.



More information about the Linux-nvme mailing list