diff options
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 977a57377930..fad167de23b4 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -110,7 +110,7 @@ static void nbd_end_request(struct request *req) | |||
110 | req, error ? "failed" : "done"); | 110 | req, error ? "failed" : "done"); |
111 | 111 | ||
112 | spin_lock_irqsave(q->queue_lock, flags); | 112 | spin_lock_irqsave(q->queue_lock, flags); |
113 | __blk_end_request(req, error, blk_rq_sectors(req) << 9); | 113 | __blk_end_request_all(req, error); |
114 | spin_unlock_irqrestore(q->queue_lock, flags); | 114 | spin_unlock_irqrestore(q->queue_lock, flags); |
115 | } | 115 | } |
116 | 116 | ||
@@ -231,7 +231,7 @@ static int nbd_send_req(struct nbd_device *lo, struct request *req) | |||
231 | { | 231 | { |
232 | int result, flags; | 232 | int result, flags; |
233 | struct nbd_request request; | 233 | struct nbd_request request; |
234 | unsigned long size = blk_rq_sectors(req) << 9; | 234 | unsigned long size = blk_rq_bytes(req); |
235 | 235 | ||
236 | request.magic = htonl(NBD_REQUEST_MAGIC); | 236 | request.magic = htonl(NBD_REQUEST_MAGIC); |
237 | request.type = htonl(nbd_cmd(req)); | 237 | request.type = htonl(nbd_cmd(req)); |
@@ -243,7 +243,7 @@ static int nbd_send_req(struct nbd_device *lo, struct request *req) | |||
243 | lo->disk->disk_name, req, | 243 | lo->disk->disk_name, req, |
244 | nbdcmd_to_ascii(nbd_cmd(req)), | 244 | nbdcmd_to_ascii(nbd_cmd(req)), |
245 | (unsigned long long)blk_rq_pos(req) << 9, | 245 | (unsigned long long)blk_rq_pos(req) << 9, |
246 | blk_rq_sectors(req) << 9); | 246 | blk_rq_bytes(req)); |
247 | result = sock_xmit(lo, 1, &request, sizeof(request), | 247 | result = sock_xmit(lo, 1, &request, sizeof(request), |
248 | (nbd_cmd(req) == NBD_CMD_WRITE) ? MSG_MORE : 0); | 248 | (nbd_cmd(req) == NBD_CMD_WRITE) ? MSG_MORE : 0); |
249 | if (result <= 0) { | 249 | if (result <= 0) { |