summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2017-10-13 14:45:58 +0200
committerJens Axboe <axboe@kernel.dk>2017-10-13 08:34:57 -0600
commitc5493845b7b303315118fb4ab96654bf7cb897f0 (patch)
tree2136b2ed437d830fb34ba9760777db34ec275f56
parent4e76af53e132bff9e2b94f018457fadabf5ab419 (diff)
downloadlinux-c5493845b7b303315118fb4ab96654bf7cb897f0.tar.bz2
lightnvm: pblk: improve error message if down_timeout fails
The two pr_err messages are useless as they don't differentiate error code. Signed-off-by: Rakesh Pandit <rakesh@tuxera.com> Reviewed-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/lightnvm/pblk-core.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index b53bb00a9918..027c42bb1ab9 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1691,16 +1691,8 @@ static void __pblk_down_page(struct pblk *pblk, struct ppa_addr *ppa_list,
#endif
ret = down_timeout(&rlun->wr_sem, msecs_to_jiffies(30000));
- if (ret) {
- switch (ret) {
- case -ETIME:
- pr_err("pblk: lun semaphore timed out\n");
- break;
- case -EINTR:
- pr_err("pblk: lun semaphore timed out\n");
- break;
- }
- }
+ if (ret == -ETIME || ret == -EINTR)
+ pr_err("pblk: taking lun semaphore timed out: err %d\n", -ret);
}
void pblk_down_page(struct pblk *pblk, struct ppa_addr *ppa_list, int nr_ppas)