projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f98d9ca
)
lightnvm: break the loop when rqd is not null
author
Wenwei Tao
<
[email protected]
>
Thu, 7 Jul 2016 07:54:07 +0000
(09:54 +0200)
committer
Jens Axboe
<
[email protected]
>
Thu, 7 Jul 2016 14:51:52 +0000
(08:51 -0600)
Break the loop when rqd is not null to reduce
an unnecessary schedule.
Signed-off-by: Wenwei Tao <
[email protected]
>
Signed-off-by: Matias Bjørling <
[email protected]
>
Signed-off-by: Jens Axboe <
[email protected]
>
drivers/lightnvm/rrpc.c
patch
|
blob
|
history
diff --git
a/drivers/lightnvm/rrpc.c
b/drivers/lightnvm/rrpc.c
index de86d72dcdf0bd90b63c317dd6de6e6bc736c062..736e66968bc627711f5cd7e34c0effe743c0c10c 100644
(file)
--- a/
drivers/lightnvm/rrpc.c
+++ b/
drivers/lightnvm/rrpc.c
@@
-96,10
+96,13
@@
static void rrpc_discard(struct rrpc *rrpc, struct bio *bio)
sector_t len = bio->bi_iter.bi_size / RRPC_EXPOSED_PAGE_SIZE;
struct nvm_rq *rqd;
-
do
{
+
while (1)
{
rqd = rrpc_inflight_laddr_acquire(rrpc, slba, len);
+ if (rqd)
+ break;
+
schedule();
- }
while (!rqd);
+ }
if (IS_ERR(rqd)) {
pr_err("rrpc: unable to acquire inflight IO\n");