diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
commit | f13771187b9423b824f32518319f6da85d819003 (patch) | |
tree | c431cf16c286065a302d5f3fb43fc1abac7e4047 /arch | |
parent | 15953654cc312429740fd58fb37a5a3d63a54376 (diff) | |
parent | 9f37af654fda88a8dcca74c785f6c20e52758866 (diff) |
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
uml: Pushdown the bkl from harddog_kern ioctl
sunrpc: Pushdown the bkl from sunrpc cache ioctl
sunrpc: Pushdown the bkl from ioctl
autofs4: Pushdown the bkl from ioctl
uml: Convert to unlocked_ioctls to remove implicit BKL
ncpfs: BKL ioctl pushdown
coda: Clean-up whitespace problems in pioctl.c
coda: BKL ioctl pushdown
drivers: Push down BKL into various drivers
isdn: Push down BKL into ioctl functions
scsi: Push down BKL into ioctl functions
dvb: Push down BKL into ioctl functions
smbfs: Push down BKL into ioctl function
coda/psdev: Remove BKL from ioctl function
um/mmapper: Remove BKL usage
sn_hwperf: Kill BKL usage
hfsplus: Push down BKL into ioctl function
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_hwperf.c | 9 | ||||
-rw-r--r-- | arch/um/drivers/harddog_kern.c | 18 | ||||
-rw-r--r-- | arch/um/drivers/hostaudio_kern.c | 8 | ||||
-rw-r--r-- | arch/um/drivers/mmapper_kern.c | 5 |
4 files changed, 23 insertions, 17 deletions
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index f6c1c5fd075d..fa1eceed0d23 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/miscdevice.h> | 30 | #include <linux/miscdevice.h> |
31 | #include <linux/utsname.h> | 31 | #include <linux/utsname.h> |
32 | #include <linux/cpumask.h> | 32 | #include <linux/cpumask.h> |
33 | #include <linux/smp_lock.h> | ||
34 | #include <linux/nodemask.h> | 33 | #include <linux/nodemask.h> |
35 | #include <linux/smp.h> | 34 | #include <linux/smp.h> |
36 | #include <linux/mutex.h> | 35 | #include <linux/mutex.h> |
@@ -682,8 +681,7 @@ static int sn_hwperf_map_err(int hwperf_err) | |||
682 | /* | 681 | /* |
683 | * ioctl for "sn_hwperf" misc device | 682 | * ioctl for "sn_hwperf" misc device |
684 | */ | 683 | */ |
685 | static int | 684 | static long sn_hwperf_ioctl(struct file *fp, u32 op, unsigned long arg) |
686 | sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg) | ||
687 | { | 685 | { |
688 | struct sn_hwperf_ioctl_args a; | 686 | struct sn_hwperf_ioctl_args a; |
689 | struct cpuinfo_ia64 *cdata; | 687 | struct cpuinfo_ia64 *cdata; |
@@ -699,8 +697,6 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg) | |||
699 | int i; | 697 | int i; |
700 | int j; | 698 | int j; |
701 | 699 | ||
702 | unlock_kernel(); | ||
703 | |||
704 | /* only user requests are allowed here */ | 700 | /* only user requests are allowed here */ |
705 | if ((op & SN_HWPERF_OP_MASK) < 10) { | 701 | if ((op & SN_HWPERF_OP_MASK) < 10) { |
706 | r = -EINVAL; | 702 | r = -EINVAL; |
@@ -859,12 +855,11 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg) | |||
859 | error: | 855 | error: |
860 | vfree(p); | 856 | vfree(p); |
861 | 857 | ||
862 | lock_kernel(); | ||
863 | return r; | 858 | return r; |
864 | } | 859 | } |
865 | 860 | ||
866 | static const struct file_operations sn_hwperf_fops = { | 861 | static const struct file_operations sn_hwperf_fops = { |
867 | .ioctl = sn_hwperf_ioctl, | 862 | .unlocked_ioctl = sn_hwperf_ioctl, |
868 | }; | 863 | }; |
869 | 864 | ||
870 | static struct miscdevice sn_hwperf_dev = { | 865 | static struct miscdevice sn_hwperf_dev = { |
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c index d332503fa1be..cfcac1ff4cf2 100644 --- a/arch/um/drivers/harddog_kern.c +++ b/arch/um/drivers/harddog_kern.c | |||
@@ -124,8 +124,8 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t | |||
124 | return 0; | 124 | return 0; |
125 | } | 125 | } |
126 | 126 | ||
127 | static int harddog_ioctl(struct inode *inode, struct file *file, | 127 | static int harddog_ioctl_unlocked(struct file *file, |
128 | unsigned int cmd, unsigned long arg) | 128 | unsigned int cmd, unsigned long arg) |
129 | { | 129 | { |
130 | void __user *argp= (void __user *)arg; | 130 | void __user *argp= (void __user *)arg; |
131 | static struct watchdog_info ident = { | 131 | static struct watchdog_info ident = { |
@@ -148,10 +148,22 @@ static int harddog_ioctl(struct inode *inode, struct file *file, | |||
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | static long harddog_ioctl(struct file *file, | ||
152 | unsigned int cmd, unsigned long arg) | ||
153 | { | ||
154 | long ret; | ||
155 | |||
156 | lock_kernel(); | ||
157 | ret = harddog_ioctl_unlocked(file, cmd, arg); | ||
158 | unlock_kernel(); | ||
159 | |||
160 | return ret; | ||
161 | } | ||
162 | |||
151 | static const struct file_operations harddog_fops = { | 163 | static const struct file_operations harddog_fops = { |
152 | .owner = THIS_MODULE, | 164 | .owner = THIS_MODULE, |
153 | .write = harddog_write, | 165 | .write = harddog_write, |
154 | .ioctl = harddog_ioctl, | 166 | .unlocked_ioctl = harddog_ioctl, |
155 | .open = harddog_open, | 167 | .open = harddog_open, |
156 | .release = harddog_release, | 168 | .release = harddog_release, |
157 | }; | 169 | }; |
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index 368219cc2366..ae42695c3597 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c | |||
@@ -136,7 +136,7 @@ static unsigned int hostaudio_poll(struct file *file, | |||
136 | return mask; | 136 | return mask; |
137 | } | 137 | } |
138 | 138 | ||
139 | static int hostaudio_ioctl(struct inode *inode, struct file *file, | 139 | static long hostaudio_ioctl(struct file *file, |
140 | unsigned int cmd, unsigned long arg) | 140 | unsigned int cmd, unsigned long arg) |
141 | { | 141 | { |
142 | struct hostaudio_state *state = file->private_data; | 142 | struct hostaudio_state *state = file->private_data; |
@@ -223,7 +223,7 @@ static int hostaudio_release(struct inode *inode, struct file *file) | |||
223 | 223 | ||
224 | /* /dev/mixer file operations */ | 224 | /* /dev/mixer file operations */ |
225 | 225 | ||
226 | static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file, | 226 | static long hostmixer_ioctl_mixdev(struct file *file, |
227 | unsigned int cmd, unsigned long arg) | 227 | unsigned int cmd, unsigned long arg) |
228 | { | 228 | { |
229 | struct hostmixer_state *state = file->private_data; | 229 | struct hostmixer_state *state = file->private_data; |
@@ -289,7 +289,7 @@ static const struct file_operations hostaudio_fops = { | |||
289 | .read = hostaudio_read, | 289 | .read = hostaudio_read, |
290 | .write = hostaudio_write, | 290 | .write = hostaudio_write, |
291 | .poll = hostaudio_poll, | 291 | .poll = hostaudio_poll, |
292 | .ioctl = hostaudio_ioctl, | 292 | .unlocked_ioctl = hostaudio_ioctl, |
293 | .mmap = NULL, | 293 | .mmap = NULL, |
294 | .open = hostaudio_open, | 294 | .open = hostaudio_open, |
295 | .release = hostaudio_release, | 295 | .release = hostaudio_release, |
@@ -298,7 +298,7 @@ static const struct file_operations hostaudio_fops = { | |||
298 | static const struct file_operations hostmixer_fops = { | 298 | static const struct file_operations hostmixer_fops = { |
299 | .owner = THIS_MODULE, | 299 | .owner = THIS_MODULE, |
300 | .llseek = no_llseek, | 300 | .llseek = no_llseek, |
301 | .ioctl = hostmixer_ioctl_mixdev, | 301 | .unlocked_ioctl = hostmixer_ioctl_mixdev, |
302 | .open = hostmixer_open_mixdev, | 302 | .open = hostmixer_open_mixdev, |
303 | .release = hostmixer_release, | 303 | .release = hostmixer_release, |
304 | }; | 304 | }; |
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c index d22f9e5c0eac..7158393b6793 100644 --- a/arch/um/drivers/mmapper_kern.c +++ b/arch/um/drivers/mmapper_kern.c | |||
@@ -46,8 +46,7 @@ static ssize_t mmapper_write(struct file *file, const char __user *buf, | |||
46 | return count; | 46 | return count; |
47 | } | 47 | } |
48 | 48 | ||
49 | static int mmapper_ioctl(struct inode *inode, struct file *file, | 49 | static long mmapper_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
50 | unsigned int cmd, unsigned long arg) | ||
51 | { | 50 | { |
52 | return -ENOIOCTLCMD; | 51 | return -ENOIOCTLCMD; |
53 | } | 52 | } |
@@ -90,7 +89,7 @@ static const struct file_operations mmapper_fops = { | |||
90 | .owner = THIS_MODULE, | 89 | .owner = THIS_MODULE, |
91 | .read = mmapper_read, | 90 | .read = mmapper_read, |
92 | .write = mmapper_write, | 91 | .write = mmapper_write, |
93 | .ioctl = mmapper_ioctl, | 92 | .unlocked_ioctl = mmapper_ioctl, |
94 | .mmap = mmapper_mmap, | 93 | .mmap = mmapper_mmap, |
95 | .open = mmapper_open, | 94 | .open = mmapper_open, |
96 | .release = mmapper_release, | 95 | .release = mmapper_release, |