diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
commit | 2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch) | |
tree | f8b3ee40674ce4acd5508a0a0bf52a30904caf6c /drivers/mmc | |
parent | 7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff) | |
parent | de75d60d5ea235e6e09f4962ab22541ce0fe176a (diff) |
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
xen-blkfront: fix missing out label
blkdev: fix blkdev_issue_zeroout return value
block: update request stacking methods to support discards
block: fix missing export of blk_types.h
writeback: fix bad _bh spinlock nesting
drbd: revert "delay probes", feature is being re-implemented differently
drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
drbd: Disable delay probes for the upcomming release
writeback: cleanup bdi_register
writeback: add new tracepoints
writeback: remove unnecessary init_timer call
writeback: optimize periodic bdi thread wakeups
writeback: prevent unnecessary bdi threads wakeups
writeback: move bdi threads exiting logic to the forker thread
writeback: restructure bdi forker loop a little
writeback: move last_active to bdi
writeback: do not remove bdi from bdi_list
writeback: simplify bdi code a little
writeback: do not lose wake-ups in bdi threads
...
Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/block.c | 5 | ||||
-rw-r--r-- | drivers/mmc/card/queue.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index cb9fbc83b090..8433cde29c8b 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/kdev_t.h> | 29 | #include <linux/kdev_t.h> |
30 | #include <linux/blkdev.h> | 30 | #include <linux/blkdev.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/smp_lock.h> | ||
32 | #include <linux/scatterlist.h> | 33 | #include <linux/scatterlist.h> |
33 | #include <linux/string_helpers.h> | 34 | #include <linux/string_helpers.h> |
34 | 35 | ||
@@ -107,6 +108,7 @@ static int mmc_blk_open(struct block_device *bdev, fmode_t mode) | |||
107 | struct mmc_blk_data *md = mmc_blk_get(bdev->bd_disk); | 108 | struct mmc_blk_data *md = mmc_blk_get(bdev->bd_disk); |
108 | int ret = -ENXIO; | 109 | int ret = -ENXIO; |
109 | 110 | ||
111 | lock_kernel(); | ||
110 | if (md) { | 112 | if (md) { |
111 | if (md->usage == 2) | 113 | if (md->usage == 2) |
112 | check_disk_change(bdev); | 114 | check_disk_change(bdev); |
@@ -117,6 +119,7 @@ static int mmc_blk_open(struct block_device *bdev, fmode_t mode) | |||
117 | ret = -EROFS; | 119 | ret = -EROFS; |
118 | } | 120 | } |
119 | } | 121 | } |
122 | unlock_kernel(); | ||
120 | 123 | ||
121 | return ret; | 124 | return ret; |
122 | } | 125 | } |
@@ -125,7 +128,9 @@ static int mmc_blk_release(struct gendisk *disk, fmode_t mode) | |||
125 | { | 128 | { |
126 | struct mmc_blk_data *md = disk->private_data; | 129 | struct mmc_blk_data *md = disk->private_data; |
127 | 130 | ||
131 | lock_kernel(); | ||
128 | mmc_blk_put(md); | 132 | mmc_blk_put(md); |
133 | unlock_kernel(); | ||
129 | return 0; | 134 | return 0; |
130 | } | 135 | } |
131 | 136 | ||
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index d6ded247d941..c77eb49eda0e 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -32,7 +32,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req) | |||
32 | /* | 32 | /* |
33 | * We only like normal block requests. | 33 | * We only like normal block requests. |
34 | */ | 34 | */ |
35 | if (!blk_fs_request(req)) { | 35 | if (req->cmd_type != REQ_TYPE_FS) { |
36 | blk_dump_rq_flags(req, "MMC bad request"); | 36 | blk_dump_rq_flags(req, "MMC bad request"); |
37 | return BLKPREP_KILL; | 37 | return BLKPREP_KILL; |
38 | } | 38 | } |
@@ -128,7 +128,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
128 | mq->req = NULL; | 128 | mq->req = NULL; |
129 | 129 | ||
130 | blk_queue_prep_rq(mq->queue, mmc_prep_request); | 130 | blk_queue_prep_rq(mq->queue, mmc_prep_request); |
131 | blk_queue_ordered(mq->queue, QUEUE_ORDERED_DRAIN, NULL); | 131 | blk_queue_ordered(mq->queue, QUEUE_ORDERED_DRAIN); |
132 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, mq->queue); | 132 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, mq->queue); |
133 | 133 | ||
134 | #ifdef CONFIG_MMC_BLOCK_BOUNCE | 134 | #ifdef CONFIG_MMC_BLOCK_BOUNCE |