aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c2
-rw-r--r--drivers/block/nbd.c1
-rw-r--r--drivers/block/paride/pd.c4
-rw-r--r--drivers/block/pktcdvd.c2
-rw-r--r--drivers/block/ps3disk.c4
-rw-r--r--drivers/block/ub.c2
6 files changed, 5 insertions, 10 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f7f163557aa..d3a25b027ff 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -546,7 +546,7 @@ static void loop_unplug(struct request_queue *q)
546{ 546{
547 struct loop_device *lo = q->queuedata; 547 struct loop_device *lo = q->queuedata;
548 548
549 clear_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags); 549 queue_flag_clear_unlocked(QUEUE_FLAG_PLUGGED, q);
550 blk_run_address_space(lo->lo_backing_file->f_mapping); 550 blk_run_address_space(lo->lo_backing_file->f_mapping);
551} 551}
552 552
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index bdba282f15e..ad98dda6037 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -577,6 +577,7 @@ static int nbd_ioctl(struct inode *inode, struct file *file,
577 switch (cmd) { 577 switch (cmd) {
578 case NBD_DISCONNECT: 578 case NBD_DISCONNECT:
579 printk(KERN_INFO "%s: NBD_DISCONNECT\n", lo->disk->disk_name); 579 printk(KERN_INFO "%s: NBD_DISCONNECT\n", lo->disk->disk_name);
580 blk_rq_init(NULL, &sreq);
580 sreq.cmd_type = REQ_TYPE_SPECIAL; 581 sreq.cmd_type = REQ_TYPE_SPECIAL;
581 nbd_cmd(&sreq) = NBD_CMD_DISC; 582 nbd_cmd(&sreq) = NBD_CMD_DISC;
582 /* 583 /*
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index df819f8a95a..570f3b70dce 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -716,10 +716,8 @@ static int pd_special_command(struct pd_unit *disk,
716 struct request rq; 716 struct request rq;
717 int err = 0; 717 int err = 0;
718 718
719 memset(&rq, 0, sizeof(rq)); 719 blk_rq_init(NULL, &rq);
720 rq.errors = 0;
721 rq.rq_disk = disk->gd; 720 rq.rq_disk = disk->gd;
722 rq.ref_count = 1;
723 rq.end_io_data = &wait; 721 rq.end_io_data = &wait;
724 rq.end_io = blk_end_sync_rq; 722 rq.end_io = blk_end_sync_rq;
725 blk_insert_request(disk->gd->queue, &rq, 0, func); 723 blk_insert_request(disk->gd->queue, &rq, 0, func);
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index fd0472996df..3ba1df93e9e 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -776,8 +776,6 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
776 776
777 rq->cmd_len = COMMAND_SIZE(cgc->cmd[0]); 777 rq->cmd_len = COMMAND_SIZE(cgc->cmd[0]);
778 memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE); 778 memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE);
779 if (sizeof(rq->cmd) > CDROM_PACKET_SIZE)
780 memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE);
781 779
782 rq->timeout = 60*HZ; 780 rq->timeout = 60*HZ;
783 rq->cmd_type = REQ_TYPE_BLOCK_PC; 781 rq->cmd_type = REQ_TYPE_BLOCK_PC;
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index 7483f947f0e..d797e209951 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -102,8 +102,7 @@ static void ps3disk_scatter_gather(struct ps3_storage_device *dev,
102 dev_dbg(&dev->sbd.core, 102 dev_dbg(&dev->sbd.core,
103 "%s:%u: bio %u: %u segs %u sectors from %lu\n", 103 "%s:%u: bio %u: %u segs %u sectors from %lu\n",
104 __func__, __LINE__, i, bio_segments(iter.bio), 104 __func__, __LINE__, i, bio_segments(iter.bio),
105 bio_sectors(iter.bio), 105 bio_sectors(iter.bio), iter.bio->bi_sector);
106 (unsigned long)iter.bio->bi_sector);
107 106
108 size = bvec->bv_len; 107 size = bvec->bv_len;
109 buf = bvec_kmap_irq(bvec, &flags); 108 buf = bvec_kmap_irq(bvec, &flags);
@@ -406,7 +405,6 @@ static void ps3disk_prepare_flush(struct request_queue *q, struct request *req)
406 405
407 dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__); 406 dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__);
408 407
409 memset(req->cmd, 0, sizeof(req->cmd));
410 req->cmd_type = REQ_TYPE_FLUSH; 408 req->cmd_type = REQ_TYPE_FLUSH;
411} 409}
412 410
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 27bfe72aab5..e322cce8c12 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -2399,7 +2399,7 @@ static void ub_disconnect(struct usb_interface *intf)
2399 del_gendisk(lun->disk); 2399 del_gendisk(lun->disk);
2400 /* 2400 /*
2401 * I wish I could do: 2401 * I wish I could do:
2402 * set_bit(QUEUE_FLAG_DEAD, &q->queue_flags); 2402 * queue_flag_set(QUEUE_FLAG_DEAD, q);
2403 * As it is, we rely on our internal poisoning and let 2403 * As it is, we rely on our internal poisoning and let
2404 * the upper levels to spin furiously failing all the I/O. 2404 * the upper levels to spin furiously failing all the I/O.
2405 */ 2405 */