static int xd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
-static struct block_device_operations xd_fops = {
+static const struct block_device_operations xd_fops = {
.owner = THIS_MODULE,
.locked_ioctl = xd_ioctl,
.getgeo = xd_getgeo,
if (xdc_busy)
return;
- req = elv_next_request(q);
- if (req)
- blkdev_dequeue_request(req);
-
+ req = blk_fetch_request(q);
while (req) {
unsigned block = blk_rq_pos(req);
unsigned count = blk_rq_cur_sectors(req);
block, count);
done:
/* wrap up, 0 = success, -errno = fail */
- if (!__blk_end_request_cur(req, res)) {
- req = elv_next_request(q);
- if (req)
- blkdev_dequeue_request(req);
- }
+ if (!__blk_end_request_cur(req, res))
+ req = blk_fetch_request(q);
}
}