projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83e8864
)
ublk: remove unnecessary NULL check in ublk_rq_has_data()
author
Ziyang Zhang
<ZiyangZhang@linux.alibaba.com>
Tue, 7 Feb 2023 07:08:37 +0000
(15:08 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Tue, 7 Feb 2023 14:21:31 +0000
(07:21 -0700)
bio_has_data() allows a NULL bio so the NULL check in
ublk_rq_has_data() is unnecessary.
Signed-off-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link:
https://lore.kernel.org/r/20230207070839.370817-2-ZiyangZhang@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c
patch
|
blob
|
history
diff --git
a/drivers/block/ublk_drv.c
b/drivers/block/ublk_drv.c
index c932e9ea5a0ff117fae1a468fa13e4803cc8cd1c..55fccce68a9ccbb392e3c3ffb4cdad7e61571b4c 100644
(file)
--- a/
drivers/block/ublk_drv.c
+++ b/
drivers/block/ublk_drv.c
@@
-322,7
+322,7
@@
static inline struct ublk_queue *ublk_get_queue(struct ublk_device *dev,
static inline bool ublk_rq_has_data(const struct request *rq)
{
- return
rq->bio &&
bio_has_data(rq->bio);
+ return bio_has_data(rq->bio);
}
static inline struct ublksrv_io_desc *ublk_get_iod(struct ublk_queue *ubq,