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 /arch/um/drivers | |
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 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index da992a3ad6b7..1bcd208c459f 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "linux/mm.h" | 33 | #include "linux/mm.h" |
34 | #include "linux/slab.h" | 34 | #include "linux/slab.h" |
35 | #include "linux/vmalloc.h" | 35 | #include "linux/vmalloc.h" |
36 | #include "linux/smp_lock.h" | ||
36 | #include "linux/blkpg.h" | 37 | #include "linux/blkpg.h" |
37 | #include "linux/genhd.h" | 38 | #include "linux/genhd.h" |
38 | #include "linux/spinlock.h" | 39 | #include "linux/spinlock.h" |
@@ -1098,6 +1099,7 @@ static int ubd_open(struct block_device *bdev, fmode_t mode) | |||
1098 | struct ubd *ubd_dev = disk->private_data; | 1099 | struct ubd *ubd_dev = disk->private_data; |
1099 | int err = 0; | 1100 | int err = 0; |
1100 | 1101 | ||
1102 | lock_kernel(); | ||
1101 | if(ubd_dev->count == 0){ | 1103 | if(ubd_dev->count == 0){ |
1102 | err = ubd_open_dev(ubd_dev); | 1104 | err = ubd_open_dev(ubd_dev); |
1103 | if(err){ | 1105 | if(err){ |
@@ -1115,7 +1117,8 @@ static int ubd_open(struct block_device *bdev, fmode_t mode) | |||
1115 | if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev); | 1117 | if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev); |
1116 | err = -EROFS; | 1118 | err = -EROFS; |
1117 | }*/ | 1119 | }*/ |
1118 | out: | 1120 | out: |
1121 | unlock_kernel(); | ||
1119 | return err; | 1122 | return err; |
1120 | } | 1123 | } |
1121 | 1124 | ||
@@ -1123,8 +1126,10 @@ static int ubd_release(struct gendisk *disk, fmode_t mode) | |||
1123 | { | 1126 | { |
1124 | struct ubd *ubd_dev = disk->private_data; | 1127 | struct ubd *ubd_dev = disk->private_data; |
1125 | 1128 | ||
1129 | lock_kernel(); | ||
1126 | if(--ubd_dev->count == 0) | 1130 | if(--ubd_dev->count == 0) |
1127 | ubd_close_dev(ubd_dev); | 1131 | ubd_close_dev(ubd_dev); |
1132 | unlock_kernel(); | ||
1128 | return 0; | 1133 | return 0; |
1129 | } | 1134 | } |
1130 | 1135 | ||