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:
612ea09
)
blk-sysfs: remove NULL pointer checking in queue_wb_lat_store
author
weiping zhang
<zhangweiping@didichuxing.com>
Thu, 23 Nov 2017 13:39:40 +0000
(21:39 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 24 Nov 2017 05:00:17 +0000
(22:00 -0700)
wbt_init doesn't set q->rq_wb to NULL, if wbt_init return 0,
so check return value is enough, remove NULL checking.
Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-sysfs.c
patch
|
blob
|
history
diff --git
a/block/blk-sysfs.c
b/block/blk-sysfs.c
index e54be402899daa18dc45ef35130d7e191d459bb0..870484eaed1f64b586ccb0fd4dd34c3f9462a29d 100644
(file)
--- a/
block/blk-sysfs.c
+++ b/
block/blk-sysfs.c
@@
-450,12
+450,9
@@
static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page,
ret = wbt_init(q);
if (ret)
return ret;
-
- rwb = q->rq_wb;
- if (!rwb)
- return -EINVAL;
}
+ rwb = q->rq_wb;
if (val == -1)
rwb->min_lat_nsec = wbt_default_latency_nsec(q);
else if (val >= 0)