summaryrefslogtreecommitdiff
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorWenwei Tao <ww.tao0320@gmail.com>2016-01-12 09:49:23 +0300
committerJens Axboe <axboe@fb.com>2016-01-12 18:21:16 +0300
commit2b11c1b24e50a26d435f1d59955f1268053623b7 (patch)
tree0b129f60302201b66b442e7611d77d50ec4eda5a /drivers/lightnvm
parent22513215b83d62a7f5e3494209b69d4d8c266ab8 (diff)
downloadlinux-2b11c1b24e50a26d435f1d59955f1268053623b7.tar.xz
lightnvm: check bi_error in gc
We should check last io completion status before starting another one. Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/rrpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index 661c6f370f5a..5df4a696184a 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -330,6 +330,10 @@ try:
goto finished;
}
wait_for_completion_io(&wait);
+ if (bio->bi_error) {
+ rrpc_inflight_laddr_release(rrpc, rqd);
+ goto finished;
+ }
bio_reset(bio);
reinit_completion(&wait);
@@ -352,6 +356,8 @@ try:
wait_for_completion_io(&wait);
rrpc_inflight_laddr_release(rrpc, rqd);
+ if (bio->bi_error)
+ goto finished;
bio_reset(bio);
}