projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9aa272b
)
UBI: Block: Explain usage of blk_rq_map_sg()
author
Richard Weinberger
<richard@nod.at>
Wed, 28 Jan 2015 15:37:40 +0000
(16:37 +0100)
committer
Richard Weinberger
<richard@nod.at>
Wed, 28 Jan 2015 15:37:40 +0000
(16:37 +0100)
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/block.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/ubi/block.c
b/drivers/mtd/ubi/block.c
index 00caf460337e2eb81630299d12093fa96c323890..995e61c38f24f8a19a7ef4f455bb91cb4b017450 100644
(file)
--- a/
drivers/mtd/ubi/block.c
+++ b/
drivers/mtd/ubi/block.c
@@
-301,6
+301,12
@@
static void ubiblock_do_work(struct work_struct *work)
struct request *req = blk_mq_rq_from_pdu(pdu);
blk_mq_start_request(req);
+
+ /*
+ * It is safe to ignore the return value of blk_rq_map_sg() because
+ * the number of sg entries is limited to UBI_MAX_SG_COUNT
+ * and ubi_read_sg() will check that limit.
+ */
blk_rq_map_sg(req->q, req, pdu->usgl.sg);
ret = ubiblock_read(pdu);