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/s390/block/dcssblk.c | |
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/s390/block/dcssblk.c')
-rw-r--r-- | drivers/s390/block/dcssblk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 9b43ae94beba..2bd72aa34c59 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/blkdev.h> | 16 | #include <linux/blkdev.h> |
17 | #include <linux/smp_lock.h> | ||
17 | #include <linux/completion.h> | 18 | #include <linux/completion.h> |
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
@@ -775,6 +776,7 @@ dcssblk_open(struct block_device *bdev, fmode_t mode) | |||
775 | struct dcssblk_dev_info *dev_info; | 776 | struct dcssblk_dev_info *dev_info; |
776 | int rc; | 777 | int rc; |
777 | 778 | ||
779 | lock_kernel(); | ||
778 | dev_info = bdev->bd_disk->private_data; | 780 | dev_info = bdev->bd_disk->private_data; |
779 | if (NULL == dev_info) { | 781 | if (NULL == dev_info) { |
780 | rc = -ENODEV; | 782 | rc = -ENODEV; |
@@ -784,6 +786,7 @@ dcssblk_open(struct block_device *bdev, fmode_t mode) | |||
784 | bdev->bd_block_size = 4096; | 786 | bdev->bd_block_size = 4096; |
785 | rc = 0; | 787 | rc = 0; |
786 | out: | 788 | out: |
789 | unlock_kernel(); | ||
787 | return rc; | 790 | return rc; |
788 | } | 791 | } |
789 | 792 | ||
@@ -794,6 +797,7 @@ dcssblk_release(struct gendisk *disk, fmode_t mode) | |||
794 | struct segment_info *entry; | 797 | struct segment_info *entry; |
795 | int rc; | 798 | int rc; |
796 | 799 | ||
800 | lock_kernel(); | ||
797 | if (!dev_info) { | 801 | if (!dev_info) { |
798 | rc = -ENODEV; | 802 | rc = -ENODEV; |
799 | goto out; | 803 | goto out; |
@@ -811,6 +815,7 @@ dcssblk_release(struct gendisk *disk, fmode_t mode) | |||
811 | up_write(&dcssblk_devices_sem); | 815 | up_write(&dcssblk_devices_sem); |
812 | rc = 0; | 816 | rc = 0; |
813 | out: | 817 | out: |
818 | unlock_kernel(); | ||
814 | return rc; | 819 | return rc; |
815 | } | 820 | } |
816 | 821 | ||