diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 4 | ||||
-rw-r--r-- | drivers/block/aoe/aoedev.c | 4 | ||||
-rw-r--r-- | drivers/block/cciss.c | 8 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 2 | ||||
-rw-r--r-- | drivers/block/floppy.c | 2 | ||||
-rw-r--r-- | drivers/block/loop.c | 6 | ||||
-rw-r--r-- | drivers/block/xen-blkfront.c | 2 | ||||
-rw-r--r-- | drivers/block/xsysace.c | 3 | ||||
-rw-r--r-- | drivers/block/z2ram.c | 6 |
10 files changed, 24 insertions, 15 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index f21c237a9e5e..541e18879965 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -4,12 +4,14 @@ * block device routines */ +#include <linux/kernel.h> #include <linux/hdreg.h> #include <linux/blkdev.h> #include <linux/backing-dev.h> #include <linux/fs.h> #include <linux/ioctl.h> #include <linux/slab.h> +#include <linux/ratelimit.h> #include <linux/genhd.h> #include <linux/netdevice.h> #include <linux/mutex.h> @@ -207,7 +209,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio) spin_lock_irqsave(&d->lock, flags); if ((d->flags & DEVFL_UP) == 0) { - printk(KERN_INFO "aoe: device %ld.%d is not up\n", + pr_info_ratelimited("aoe: device %ld.%d is not up\n", d->aoemajor, d->aoeminor); spin_unlock_irqrestore(&d->lock, flags); mempool_free(buf, d->bufpool); diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index 0849280bfc1c..6b5110a47458 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c @@ -102,6 +102,7 @@ aoedev_freedev(struct aoedev *d) { struct aoetgt **t, **e; + cancel_work_sync(&d->work); if (d->gd) { aoedisk_rm_sysfs(d); del_gendisk(d->gd); @@ -135,7 +136,6 @@ aoedev_flush(const char __user *str, size_t cnt) all = !strncmp(buf, "all", 3); } - flush_scheduled_work(); spin_lock_irqsave(&devlist_lock, flags); dd = &devlist; while ((d = *dd)) { @@ -257,8 +257,6 @@ aoedev_exit(void) struct aoedev *d; ulong flags; - flush_scheduled_work(); - while ((d = devlist)) { devlist = d->next; diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 39631cbccaf8..a67d0a611a8a 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -122,7 +122,9 @@ static struct board_type products[] = { {0x3214103C, "Smart Array E200i", &SA5_access}, {0x3215103C, "Smart Array E200i", &SA5_access}, {0x3237103C, "Smart Array E500", &SA5_access}, - {0x323d103c, "Smart Array P700M", &SA5_access}, + {0x3223103C, "Smart Array P800", &SA5_access}, + {0x3234103C, "Smart Array P400", &SA5_access}, + {0x323D103C, "Smart Array P700m", &SA5_access}, }; /* How long to wait (in milliseconds) for board to go into simple mode */ @@ -1151,6 +1153,7 @@ static int cciss_ioctl32_big_passthru(struct block_device *bdev, fmode_t mode, int err; u32 cp; + memset(&arg64, 0, sizeof(arg64)); err = 0; err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info, @@ -4923,7 +4926,8 @@ static void __exit cciss_cleanup(void) } } kthread_stop(cciss_scan_thread); - remove_proc_entry("driver/cciss", NULL); + if (proc_cciss) + remove_proc_entry("driver/cciss", NULL); bus_unregister(&cciss_bus_type); } diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index c68dc290d11f..1ea1a34e78b2 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -1862,7 +1862,7 @@ static inline sector_t drbd_md_last_sector(struct drbd_backing_dev *bdev) static inline sector_t drbd_get_capacity(struct block_device *bdev) { /* return bdev ? get_capacity(bdev->bd_disk) : 0; */ - return bdev ? bdev->bd_inode->i_size >> 9 : 0; + return bdev ? i_size_read(bdev->bd_inode) >> 9 : 0; } /** diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 2e4df4783fd5..6be5401d0e88 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -2993,7 +2993,7 @@ static int drbd_create_mempools(void) drbd_ee_mempool = mempool_create(number, mempool_alloc_slab, mempool_free_slab, drbd_ee_cache); - if (drbd_request_mempool == NULL) + if (drbd_ee_mempool == NULL) goto Enomem; /* drbd's page pool */ diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 767107cce982..8f19b380ca83 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4363,9 +4363,9 @@ out_unreg_blkdev: out_put_disk: while (dr--) { del_timer(&motor_off_timer[dr]); - put_disk(disks[dr]); if (disks[dr]->queue) blk_cleanup_queue(disks[dr]->queue); + put_disk(disks[dr]); } return err; } diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 6c48b3545f84..1e5284ef65fa 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -101,8 +101,8 @@ static int transfer_none(struct loop_device *lo, int cmd, else memcpy(raw_buf, loop_buf, size); - kunmap_atomic(raw_buf, KM_USER0); kunmap_atomic(loop_buf, KM_USER1); + kunmap_atomic(raw_buf, KM_USER0); cond_resched(); return 0; } @@ -130,8 +130,8 @@ static int transfer_xor(struct loop_device *lo, int cmd, for (i = 0; i < size; i++) *out++ = *in++ ^ key[(i & 511) % keysize]; - kunmap_atomic(raw_buf, KM_USER0); kunmap_atomic(loop_buf, KM_USER1); + kunmap_atomic(raw_buf, KM_USER0); cond_resched(); return 0; } @@ -1049,9 +1049,9 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev) if (bdev) invalidate_bdev(bdev); set_capacity(lo->lo_disk, 0); + loop_sysfs_exit(lo); if (bdev) { bd_set_size(bdev, 0); - loop_sysfs_exit(lo); /* let user-space know about this change */ kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE); } diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 4b33a18c32e0..06e2812ba124 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1112,6 +1112,8 @@ static void blkback_changed(struct xenbus_device *dev, case XenbusStateInitialising: case XenbusStateInitWait: case XenbusStateInitialised: + case XenbusStateReconfiguring: + case XenbusStateReconfigured: case XenbusStateUnknown: case XenbusStateClosed: break; diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 6e968cd4893c..829161edae53 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -1225,7 +1225,8 @@ ace_of_probe(struct platform_device *op, const struct of_device_id *match) bus_width = ACE_BUS_WIDTH_8; /* Call the bus-independant setup code */ - return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width); + return ace_alloc(&op->dev, id ? be32_to_cpup(id) : 0, + physaddr, irq, bus_width); } static int __devexit ace_of_remove(struct platform_device *op) diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index dcd4cfcf4126..a22e3f895947 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c @@ -80,8 +80,10 @@ static void do_z2_request(struct request_queue *q) int err = 0; if (start + len > z2ram_size) { - printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", - blk_rq_pos(req), blk_rq_cur_sectors(req)); + pr_err(DEVICE_NAME ": bad access: block=%llu, " + "count=%u\n", + (unsigned long long)blk_rq_pos(req), + blk_rq_cur_sectors(req)); err = -EIO; goto done; } |