summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2010-01-13 15:32:21 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:54:23 -0800
commitf9de332ebf9df71892d52f7eb64af101a647349f (patch)
tree97df3d94bc1d385adb2191549069675b4e01bbee /drivers/usb/core/devio.c
parent063e20eb980f281d8456c3b48f146107f5cb2338 (diff)
downloadlinux-f9de332ebf9df71892d52f7eb64af101a647349f.tar.gz
linux-f9de332ebf9df71892d52f7eb64af101a647349f.tar.bz2
linux-f9de332ebf9df71892d52f7eb64af101a647349f.zip
USB: Remove BKL from lseek implementations
Replace it by mutex_lock(&file->f_dentry->d_inode->i_mutex); following the example of the generic method Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 6e731507c0c4..300f65f681a3 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -122,7 +122,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
{
loff_t ret;
- lock_kernel();
+ mutex_lock(&file->f_dentry->d_inode->i_mutex);
switch (orig) {
case 0:
@@ -138,7 +138,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
ret = -EINVAL;
}
- unlock_kernel();
+ mutex_unlock(&file->f_dentry->d_inode->i_mutex);
return ret;
}