blk-mq: fix racy updates of rq->errors
Christoph Hellwig
hch at lst.de
Mon Oct 12 12:15:16 PDT 2015
On Mon, Oct 12, 2015 at 09:05:22PM +0200, Christoph Hellwig wrote:
> On Tue, Oct 06, 2015 at 09:54:42PM +0300, Dan Carpenter wrote:
> > 622 if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
> > 623 if (cmd_rq->ctx == CMD_CTX_CANCELLED)
> > 624 status = -EINTR;
> >
> > This looks like it's supposed to be a bitmap.
>
> It's not - it's a value that can have either positive (nvme status codes)
> or negative Linux errnos. It really should be an int just like req->errors
> was before. I'll send a patch to Jens.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
And next time I'll wait with the signoff until I've tested and sent
the patch :)
More information about the Linux-nvme
mailing list