On 11/16/21 11:17 PM, Christoph Hellwig wrote: > On Tue, Nov 16, 2021 at 08:38:06PM -0700, Jens Axboe wrote: >> + ret = nvme_prep_rq(dev, ns, req, &iod->cmd); >> + if (ret == BLK_STS_OK) { >> + nvme_submit_cmd(nvmeq, &iod->cmd, bd->last); >> + return BLK_STS_OK; >> + } >> + return ret; > > I'd prefer the traditional handle errors outside the straight path > order here: > > ret = nvme_prep_rq(dev, ns, req, &iod->cmd); > if (ret) > return ret; > nvme_submit_cmd(nvmeq, &iod->cmd, bd->last); > return BLK_STS_OK; Sure, changed. -- Jens Axboe