]> git.baikalelectronics.ru Git - kernel.git/commit
scatterlist: make sure sg_miter_next() doesn't return 0 sized mappings
authorTejun Heo <tj@kernel.org>
Wed, 15 Apr 2009 13:10:23 +0000 (22:10 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 22 Apr 2009 06:35:09 +0000 (08:35 +0200)
commite1db3a87f3ff58228a385bf82015950b7bc47e4d
tree5c86aecb937ec49effaaf7cca526baf36c9c3eaf
parent1e0aeebdb5124157dd204ae4c92d732bfd7443c5
scatterlist: make sure sg_miter_next() doesn't return 0 sized mappings

Impact: fix not-so-critical but annoying bug

sg_miter_next() returns 0 sized mapping if there is an zero sized sg
entry in the list or at the end of each iteration.  As the users
always check the ->length field, this bug shouldn't be critical other
than causing unnecessary iteration.

Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
lib/scatterlist.c