USB: Remove BKL from lseek implementations
[safe/jmp/linux-2.6] / drivers / usb / core / devio.c
index 6e73150..300f65f 100644 (file)
@@ -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;
 }