diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/Makefile | 2 | ||||
-rw-r--r-- | drivers/block/aoe/Makefile | 2 | ||||
-rw-r--r-- | drivers/block/cciss.c | 2 | ||||
-rw-r--r-- | drivers/block/floppy.c | 2 | ||||
-rw-r--r-- | drivers/block/loop.c | 8 | ||||
-rw-r--r-- | drivers/block/nbd.c | 3 |
6 files changed, 7 insertions, 12 deletions
diff --git a/drivers/block/Makefile b/drivers/block/Makefile index d7f463d6312d..40528ba56d1b 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile | |||
@@ -39,4 +39,4 @@ obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o | |||
39 | obj-$(CONFIG_BLK_DEV_DRBD) += drbd/ | 39 | obj-$(CONFIG_BLK_DEV_DRBD) += drbd/ |
40 | obj-$(CONFIG_BLK_DEV_RBD) += rbd.o | 40 | obj-$(CONFIG_BLK_DEV_RBD) += rbd.o |
41 | 41 | ||
42 | swim_mod-objs := swim.o swim_asm.o | 42 | swim_mod-y := swim.o swim_asm.o |
diff --git a/drivers/block/aoe/Makefile b/drivers/block/aoe/Makefile index e76d997183c6..06ea82cdf27d 100644 --- a/drivers/block/aoe/Makefile +++ b/drivers/block/aoe/Makefile | |||
@@ -3,4 +3,4 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_ATA_OVER_ETH) += aoe.o | 5 | obj-$(CONFIG_ATA_OVER_ETH) += aoe.o |
6 | aoe-objs := aoeblk.o aoechr.o aoecmd.o aoedev.o aoemain.o aoenet.o | 6 | aoe-y := aoeblk.o aoechr.o aoecmd.o aoedev.o aoemain.o aoenet.o |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 516d5bbec2b6..9279272b3732 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -2833,7 +2833,7 @@ static int cciss_revalidate(struct gendisk *disk) | |||
2833 | sector_t total_size; | 2833 | sector_t total_size; |
2834 | InquiryData_struct *inq_buff = NULL; | 2834 | InquiryData_struct *inq_buff = NULL; |
2835 | 2835 | ||
2836 | for (logvol = 0; logvol < CISS_MAX_LUN; logvol++) { | 2836 | for (logvol = 0; logvol <= h->highest_lun; logvol++) { |
2837 | if (!h->drv[logvol]) | 2837 | if (!h->drv[logvol]) |
2838 | continue; | 2838 | continue; |
2839 | if (memcmp(h->drv[logvol]->LunID, drv->LunID, | 2839 | if (memcmp(h->drv[logvol]->LunID, drv->LunID, |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index b9ba04fc2b34..77fc76f8aea9 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -3281,7 +3281,7 @@ static int set_geometry(unsigned int cmd, struct floppy_struct *g, | |||
3281 | struct block_device *bdev = opened_bdev[cnt]; | 3281 | struct block_device *bdev = opened_bdev[cnt]; |
3282 | if (!bdev || ITYPE(drive_state[cnt].fd_device) != type) | 3282 | if (!bdev || ITYPE(drive_state[cnt].fd_device) != type) |
3283 | continue; | 3283 | continue; |
3284 | __invalidate_device(bdev); | 3284 | __invalidate_device(bdev, true); |
3285 | } | 3285 | } |
3286 | mutex_unlock(&open_lock); | 3286 | mutex_unlock(&open_lock); |
3287 | } else { | 3287 | } else { |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 44e18c073c44..dbf31ec9114d 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -78,7 +78,6 @@ | |||
78 | 78 | ||
79 | #include <asm/uaccess.h> | 79 | #include <asm/uaccess.h> |
80 | 80 | ||
81 | static DEFINE_MUTEX(loop_mutex); | ||
82 | static LIST_HEAD(loop_devices); | 81 | static LIST_HEAD(loop_devices); |
83 | static DEFINE_MUTEX(loop_devices_mutex); | 82 | static DEFINE_MUTEX(loop_devices_mutex); |
84 | 83 | ||
@@ -1501,11 +1500,9 @@ static int lo_open(struct block_device *bdev, fmode_t mode) | |||
1501 | { | 1500 | { |
1502 | struct loop_device *lo = bdev->bd_disk->private_data; | 1501 | struct loop_device *lo = bdev->bd_disk->private_data; |
1503 | 1502 | ||
1504 | mutex_lock(&loop_mutex); | ||
1505 | mutex_lock(&lo->lo_ctl_mutex); | 1503 | mutex_lock(&lo->lo_ctl_mutex); |
1506 | lo->lo_refcnt++; | 1504 | lo->lo_refcnt++; |
1507 | mutex_unlock(&lo->lo_ctl_mutex); | 1505 | mutex_unlock(&lo->lo_ctl_mutex); |
1508 | mutex_unlock(&loop_mutex); | ||
1509 | 1506 | ||
1510 | return 0; | 1507 | return 0; |
1511 | } | 1508 | } |
@@ -1515,7 +1512,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode) | |||
1515 | struct loop_device *lo = disk->private_data; | 1512 | struct loop_device *lo = disk->private_data; |
1516 | int err; | 1513 | int err; |
1517 | 1514 | ||
1518 | mutex_lock(&loop_mutex); | ||
1519 | mutex_lock(&lo->lo_ctl_mutex); | 1515 | mutex_lock(&lo->lo_ctl_mutex); |
1520 | 1516 | ||
1521 | if (--lo->lo_refcnt) | 1517 | if (--lo->lo_refcnt) |
@@ -1540,7 +1536,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode) | |||
1540 | out: | 1536 | out: |
1541 | mutex_unlock(&lo->lo_ctl_mutex); | 1537 | mutex_unlock(&lo->lo_ctl_mutex); |
1542 | out_unlocked: | 1538 | out_unlocked: |
1543 | mutex_unlock(&loop_mutex); | ||
1544 | return 0; | 1539 | return 0; |
1545 | } | 1540 | } |
1546 | 1541 | ||
@@ -1641,6 +1636,9 @@ out: | |||
1641 | 1636 | ||
1642 | static void loop_free(struct loop_device *lo) | 1637 | static void loop_free(struct loop_device *lo) |
1643 | { | 1638 | { |
1639 | if (!lo->lo_queue->queue_lock) | ||
1640 | lo->lo_queue->queue_lock = &lo->lo_queue->__queue_lock; | ||
1641 | |||
1644 | blk_cleanup_queue(lo->lo_queue); | 1642 | blk_cleanup_queue(lo->lo_queue); |
1645 | put_disk(lo->lo_disk); | 1643 | put_disk(lo->lo_disk); |
1646 | list_del(&lo->lo_list); | 1644 | list_del(&lo->lo_list); |
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index a32fb41246f8..e6fc716aca45 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #define DBG_BLKDEV 0x0100 | 53 | #define DBG_BLKDEV 0x0100 |
54 | #define DBG_RX 0x0200 | 54 | #define DBG_RX 0x0200 |
55 | #define DBG_TX 0x0400 | 55 | #define DBG_TX 0x0400 |
56 | static DEFINE_MUTEX(nbd_mutex); | ||
57 | static unsigned int debugflags; | 56 | static unsigned int debugflags; |
58 | #endif /* NDEBUG */ | 57 | #endif /* NDEBUG */ |
59 | 58 | ||
@@ -718,11 +717,9 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode, | |||
718 | dprintk(DBG_IOCTL, "%s: nbd_ioctl cmd=%s(0x%x) arg=%lu\n", | 717 | dprintk(DBG_IOCTL, "%s: nbd_ioctl cmd=%s(0x%x) arg=%lu\n", |
719 | lo->disk->disk_name, ioctl_cmd_to_ascii(cmd), cmd, arg); | 718 | lo->disk->disk_name, ioctl_cmd_to_ascii(cmd), cmd, arg); |
720 | 719 | ||
721 | mutex_lock(&nbd_mutex); | ||
722 | mutex_lock(&lo->tx_lock); | 720 | mutex_lock(&lo->tx_lock); |
723 | error = __nbd_ioctl(bdev, lo, cmd, arg); | 721 | error = __nbd_ioctl(bdev, lo, cmd, arg); |
724 | mutex_unlock(&lo->tx_lock); | 722 | mutex_unlock(&lo->tx_lock); |
725 | mutex_unlock(&nbd_mutex); | ||
726 | 723 | ||
727 | return error; | 724 | return error; |
728 | } | 725 | } |