mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Javier González" <jg@lightnvm.io>
To: mb@lightnvm.io, axboe@fb.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Javier González" <javier@cnexlabs.com>,
	"Matias Bjørling" <matias@cnexlabs.com>
Subject: [PATCH 02/20] lightnvm: propagate right error code to target
Date: Mon, 26 Jun 2017 11:57:11 +0200	[thread overview]
Message-ID: <1498471049-25505-3-git-send-email-javier@cnexlabs.com> (raw)
In-Reply-To: <1498471049-25505-1-git-send-email-javier@cnexlabs.com>

If nvme_alloc_request fails, propagate the right error, instead of
assuming ENOMEM.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
---
 drivers/nvme/host/lightnvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 2d7a2889866f..334943189dd1 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -509,7 +509,7 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd)
 	rq = nvme_alloc_request(q, (struct nvme_command *)cmd, 0, NVME_QID_ANY);
 	if (IS_ERR(rq)) {
 		kfree(cmd);
-		return -ENOMEM;
+		return PTR_ERR(rq);
 	}
 	rq->cmd_flags &= ~REQ_FAILFAST_DRIVER;
 
-- 
2.7.4

  parent reply	other threads:[~2017-06-26  9:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26  9:57 [PATCH 00/20] LightNVM: pblk patches for 4.13 Javier González
2017-06-26  9:57 ` [PATCH 01/20] lightnvm: re-convert ppa format on I/O failure Javier González
2017-06-26  9:57 ` Javier González [this message]
2017-06-26  9:57 ` [PATCH 03/20] lightnvm: pblk: spare double cpu_to_le64 calc Javier González
2017-06-26  9:57 ` [PATCH 04/20] lightnvm: pblk: add debug stat for read cache hits Javier González
2017-06-26  9:57 ` [PATCH 05/20] lightnvm: pblk: expose max sec per write on sysfs Javier González
2017-06-26  9:57 ` [PATCH 06/20] lightnvm: pblk: generalize erase path Javier González
2017-06-26  9:57 ` [PATCH 07/20] lightnvm: pblk: rename read request pool Javier González
2017-06-26  9:57 ` [PATCH 08/20] lightnvm: pblk: sched. metadata on write thread Javier González
2017-09-20 18:28   ` Rakesh Pandit
2017-09-20 19:25     ` Rakesh Pandit
2017-06-26  9:57 ` [PATCH 09/20] lightnvm: pblk: delete redundant debug line stat Javier González
2017-06-26  9:57 ` [PATCH 10/20] lightnvm: pblk: delete redundant buffer pointer Javier González
2017-06-26  9:57 ` [PATCH 11/20] lightnvm: pblk: issue multiplane reads if possible Javier González
2017-06-26  9:57 ` [PATCH 12/20] lightnvm: pblk: simplify meta. memory allocation Javier González
2017-06-26  9:57 ` [PATCH 13/20] lightnvm: pblk: decouple bad block from line alloc Javier González
2017-06-26  9:57 ` [PATCH 14/20] lightnvm: pblk: choose optimal victim GC line Javier González
2017-06-26  9:57 ` [PATCH 15/20] lightnvm: pblk: set metadata list for all I/Os Javier González
2017-06-26  9:57 ` [PATCH 16/20] lightnvm: pblk: cleanup unnecessary code Javier González
2017-06-26  9:57 ` [PATCH 17/20] lightnvm: pblk: add lock assertions on helpers Javier González
2017-06-26  9:57 ` [PATCH 18/20] lightnvm: pblk: redesign GC algorithm Javier González
2017-06-26  9:57 ` [PATCH 19/20] lightnvm: pblk: set mempool and workqueue params Javier González
2017-06-26  9:57 ` [PATCH 20/20] lightnvm: pblk: fail gracefully on irrec. error Javier González
2017-06-26 22:29 ` [PATCH 00/20] LightNVM: pblk patches for 4.13 Jens Axboe
2017-06-27  8:00   ` Javier González

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498471049-25505-3-git-send-email-javier@cnexlabs.com \
    --to=jg@lightnvm.io \
    --cc=axboe@fb.com \
    --cc=javier@cnexlabs.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matias@cnexlabs.com \
    --cc=mb@lightnvm.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®