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:
bdb0250
)
[BLOCK] Clear sg entry before filling in blk_rq_map_sg()
author
Jens Axboe
<jens.axboe@oracle.com>
Wed, 17 Oct 2007 11:02:33 +0000
(13:02 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Wed, 17 Oct 2007 11:02:33 +0000
(13:02 +0200)
The memset() of the sg entry was originally removed, because it could
overwrite a chain pointer. But it's quite OK to memset() it when we know
it's a valid entry, since it can't contain a chain pointer.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/ll_rw_blk.c
patch
|
blob
|
blame
|
history
diff --git
a/block/ll_rw_blk.c
b/block/ll_rw_blk.c
index 9eabac95fbe053917cb25f7ba1e9fb208b8e94d1..1014d349a386b48385a75f0a98de7186d25df73d 100644
(file)
--- a/
block/ll_rw_blk.c
+++ b/
block/ll_rw_blk.c
@@
-1352,6
+1352,7
@@
new_segment:
sg = next_sg;
next_sg = sg_next(sg);
+ memset(sg, 0, sizeof(*sg));
sg->page = bvec->bv_page;
sg->length = nbytes;
sg->offset = bvec->bv_offset;