Commit 1d5210ef authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Linus Torvalds

scatterlist: reorder compound boolean expression

Test the cheaper boolean expression with no side effects first.

Link: default avatarGilad Ben-Yossef <>
Cc: Jens Axboe <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 95e91b83
......@@ -666,7 +666,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
while (sg_miter_next(&miter) && offset < buflen) {
while ((offset < buflen) && sg_miter_next(&miter)) {
unsigned int len;
len = min(miter.length, buflen - offset);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment