diff options
author | Wenwei Tao <ww.tao0320@gmail.com> | 2016-01-12 01:49:23 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-01-12 10:21:16 -0500 |
commit | 2b11c1b24e50a26d435f1d59955f1268053623b7 (patch) | |
tree | 0b129f60302201b66b442e7611d77d50ec4eda5a | |
parent | 22513215b83d62a7f5e3494209b69d4d8c266ab8 (diff) |
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>
-rw-r--r-- | drivers/lightnvm/rrpc.c | 6 |
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: | |||
330 | goto finished; | 330 | goto finished; |
331 | } | 331 | } |
332 | wait_for_completion_io(&wait); | 332 | wait_for_completion_io(&wait); |
333 | if (bio->bi_error) { | ||
334 | rrpc_inflight_laddr_release(rrpc, rqd); | ||
335 | goto finished; | ||
336 | } | ||
333 | 337 | ||
334 | bio_reset(bio); | 338 | bio_reset(bio); |
335 | reinit_completion(&wait); | 339 | reinit_completion(&wait); |
@@ -352,6 +356,8 @@ try: | |||
352 | wait_for_completion_io(&wait); | 356 | wait_for_completion_io(&wait); |
353 | 357 | ||
354 | rrpc_inflight_laddr_release(rrpc, rqd); | 358 | rrpc_inflight_laddr_release(rrpc, rqd); |
359 | if (bio->bi_error) | ||
360 | goto finished; | ||
355 | 361 | ||
356 | bio_reset(bio); | 362 | bio_reset(bio); |
357 | } | 363 | } |