mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 01:10:28 +00:00
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>
This commit is contained in:
parent
063e20eb98
commit
f9de332ebf
@ -675,7 +675,7 @@ static loff_t usb_device_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:
|
||||
@ -691,7 +691,7 @@ static loff_t usb_device_lseek(struct file *file, loff_t offset, int orig)
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
unlock_kernel();
|
||||
mutex_unlock(&file->f_dentry->d_inode->i_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user