diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-03-05 02:03:53 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-03-05 06:04:57 -0500 |
commit | a3941ec101a5ec54c1e929730afeb196441a171e (patch) | |
tree | f714362623fb68f2e8e462be854f0feff88b63f1 /drivers/block/loop.c | |
parent | 5e18cfd04feca78cc08a6b8b71a60a610de81eaa (diff) |
loop: don't increment p->offset with (size_t) -EINVAL
Upon a 'transfer error block' size is set to -EINVAL, but this becomes positive
since size is unsigned: p->offset still gets incremented.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index edbaac6c0573..bf0345577672 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -392,8 +392,7 @@ lo_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf, | |||
392 | struct loop_device *lo = p->lo; | 392 | struct loop_device *lo = p->lo; |
393 | struct page *page = buf->page; | 393 | struct page *page = buf->page; |
394 | sector_t IV; | 394 | sector_t IV; |
395 | size_t size; | 395 | int size, ret; |
396 | int ret; | ||
397 | 396 | ||
398 | ret = buf->ops->confirm(pipe, buf); | 397 | ret = buf->ops->confirm(pipe, buf); |
399 | if (unlikely(ret)) | 398 | if (unlikely(ret)) |