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 /drivers/scsi/dpt_i2o.c | |
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 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 0435d044c9da..b0c576f84b28 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -114,12 +114,13 @@ static int hba_count = 0; | |||
114 | 114 | ||
115 | static struct class *adpt_sysfs_class; | 115 | static struct class *adpt_sysfs_class; |
116 | 116 | ||
117 | static long adpt_unlocked_ioctl(struct file *, unsigned int, unsigned long); | ||
117 | #ifdef CONFIG_COMPAT | 118 | #ifdef CONFIG_COMPAT |
118 | static long compat_adpt_ioctl(struct file *, unsigned int, unsigned long); | 119 | static long compat_adpt_ioctl(struct file *, unsigned int, unsigned long); |
119 | #endif | 120 | #endif |
120 | 121 | ||
121 | static const struct file_operations adpt_fops = { | 122 | static const struct file_operations adpt_fops = { |
122 | .ioctl = adpt_ioctl, | 123 | .unlocked_ioctl = adpt_unlocked_ioctl, |
123 | .open = adpt_open, | 124 | .open = adpt_open, |
124 | .release = adpt_close, | 125 | .release = adpt_close, |
125 | #ifdef CONFIG_COMPAT | 126 | #ifdef CONFIG_COMPAT |
@@ -2069,8 +2070,7 @@ static int adpt_system_info(void __user *buffer) | |||
2069 | return 0; | 2070 | return 0; |
2070 | } | 2071 | } |
2071 | 2072 | ||
2072 | static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, | 2073 | static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) |
2073 | ulong arg) | ||
2074 | { | 2074 | { |
2075 | int minor; | 2075 | int minor; |
2076 | int error = 0; | 2076 | int error = 0; |
@@ -2153,6 +2153,20 @@ static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, | |||
2153 | return error; | 2153 | return error; |
2154 | } | 2154 | } |
2155 | 2155 | ||
2156 | static long adpt_unlocked_ioctl(struct file *file, uint cmd, ulong arg) | ||
2157 | { | ||
2158 | struct inode *inode; | ||
2159 | long ret; | ||
2160 | |||
2161 | inode = file->f_dentry->d_inode; | ||
2162 | |||
2163 | lock_kernel(); | ||
2164 | ret = adpt_ioctl(inode, file, cmd, arg); | ||
2165 | unlock_kernel(); | ||
2166 | |||
2167 | return ret; | ||
2168 | } | ||
2169 | |||
2156 | #ifdef CONFIG_COMPAT | 2170 | #ifdef CONFIG_COMPAT |
2157 | static long compat_adpt_ioctl(struct file *file, | 2171 | static long compat_adpt_ioctl(struct file *file, |
2158 | unsigned int cmd, unsigned long arg) | 2172 | unsigned int cmd, unsigned long arg) |