aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2010-01-13 09:32:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:23 -0500
commitf9de332ebf9df71892d52f7eb64af101a647349f (patch)
tree97df3d94bc1d385adb2191549069675b4e01bbee /drivers
parent063e20eb980f281d8456c3b48f146107f5cb2338 (diff)
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')
-rw-r--r--drivers/usb/core/devices.c4
-rw-r--r--drivers/usb/core/devio.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index 175529fd02f3..c83c975152a6 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -675,7 +675,7 @@ static loff_t usb_device_lseek(struct file *file, loff_t offset, int orig)
675{ 675{
676 loff_t ret; 676 loff_t ret;
677 677
678 lock_kernel(); 678 mutex_lock(&file->f_dentry->d_inode->i_mutex);
679 679
680 switch (orig) { 680 switch (orig) {
681 case 0: 681 case 0:
@@ -691,7 +691,7 @@ static loff_t usb_device_lseek(struct file *file, loff_t offset, int orig)
691 ret = -EINVAL; 691 ret = -EINVAL;
692 } 692 }
693 693
694 unlock_kernel(); 694 mutex_unlock(&file->f_dentry->d_inode->i_mutex);
695 return ret; 695 return ret;
696} 696}
697 697
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)
122{ 122{
123 loff_t ret; 123 loff_t ret;
124 124
125 lock_kernel(); 125 mutex_lock(&file->f_dentry->d_inode->i_mutex);
126 126
127 switch (orig) { 127 switch (orig) {
128 case 0: 128 case 0:
@@ -138,7 +138,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
138 ret = -EINVAL; 138 ret = -EINVAL;
139 } 139 }
140 140
141 unlock_kernel(); 141 mutex_unlock(&file->f_dentry->d_inode->i_mutex);
142 return ret; 142 return ret;
143} 143}
144 144