diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:43:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:43:11 -0400 |
commit | 5704e44d283e907623e3775c1262f206a2c48cf3 (patch) | |
tree | 0a981b24173e90854e7b7d812b35859e1e5f0174 /arch/um/drivers/ubd_kern.c | |
parent | 91151240ed8e97cc4457dae4094153c2744f1eb8 (diff) | |
parent | 6de5bd128d381ad88ac6d419a5e597048eb468cf (diff) |
Merge branch 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
BKL: introduce CONFIG_BKL.
dabusb: remove the BKL
sunrpc: remove the big kernel lock
init/main.c: remove BKL notations
blktrace: remove the big kernel lock
rtmutex-tester: make it build without BKL
dvb-core: kill the big kernel lock
dvb/bt8xx: kill the big kernel lock
tlclk: remove big kernel lock
fix rawctl compat ioctls breakage on amd64 and itanic
uml: kill big kernel lock
parisc: remove big kernel lock
cris: autoconvert trivial BKL users
alpha: kill big kernel lock
isapnp: BKL removal
s390/block: kill the big kernel lock
hpet: kill BKL, add compat_ioctl
Diffstat (limited to 'arch/um/drivers/ubd_kern.c')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 9734994cba1..ba4a98ba39c 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -33,7 +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/mutex.h" |
37 | #include "linux/blkpg.h" | 37 | #include "linux/blkpg.h" |
38 | #include "linux/genhd.h" | 38 | #include "linux/genhd.h" |
39 | #include "linux/spinlock.h" | 39 | #include "linux/spinlock.h" |
@@ -100,6 +100,7 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data) | |||
100 | #define DRIVER_NAME "uml-blkdev" | 100 | #define DRIVER_NAME "uml-blkdev" |
101 | 101 | ||
102 | static DEFINE_MUTEX(ubd_lock); | 102 | static DEFINE_MUTEX(ubd_lock); |
103 | static DEFINE_MUTEX(ubd_mutex); /* replaces BKL, might not be needed */ | ||
103 | 104 | ||
104 | static int ubd_open(struct block_device *bdev, fmode_t mode); | 105 | static int ubd_open(struct block_device *bdev, fmode_t mode); |
105 | static int ubd_release(struct gendisk *disk, fmode_t mode); | 106 | static int ubd_release(struct gendisk *disk, fmode_t mode); |
@@ -1101,7 +1102,7 @@ static int ubd_open(struct block_device *bdev, fmode_t mode) | |||
1101 | struct ubd *ubd_dev = disk->private_data; | 1102 | struct ubd *ubd_dev = disk->private_data; |
1102 | int err = 0; | 1103 | int err = 0; |
1103 | 1104 | ||
1104 | lock_kernel(); | 1105 | mutex_lock(&ubd_mutex); |
1105 | if(ubd_dev->count == 0){ | 1106 | if(ubd_dev->count == 0){ |
1106 | err = ubd_open_dev(ubd_dev); | 1107 | err = ubd_open_dev(ubd_dev); |
1107 | if(err){ | 1108 | if(err){ |
@@ -1120,7 +1121,7 @@ static int ubd_open(struct block_device *bdev, fmode_t mode) | |||
1120 | err = -EROFS; | 1121 | err = -EROFS; |
1121 | }*/ | 1122 | }*/ |
1122 | out: | 1123 | out: |
1123 | unlock_kernel(); | 1124 | mutex_unlock(&ubd_mutex); |
1124 | return err; | 1125 | return err; |
1125 | } | 1126 | } |
1126 | 1127 | ||
@@ -1128,10 +1129,10 @@ static int ubd_release(struct gendisk *disk, fmode_t mode) | |||
1128 | { | 1129 | { |
1129 | struct ubd *ubd_dev = disk->private_data; | 1130 | struct ubd *ubd_dev = disk->private_data; |
1130 | 1131 | ||
1131 | lock_kernel(); | 1132 | mutex_lock(&ubd_mutex); |
1132 | if(--ubd_dev->count == 0) | 1133 | if(--ubd_dev->count == 0) |
1133 | ubd_close_dev(ubd_dev); | 1134 | ubd_close_dev(ubd_dev); |
1134 | unlock_kernel(); | 1135 | mutex_unlock(&ubd_mutex); |
1135 | return 0; | 1136 | return 0; |
1136 | } | 1137 | } |
1137 | 1138 | ||