Loading drivers/usb/gadget/function/f_mtp.c +10 −7 Original line number Diff line number Diff line Loading @@ -1123,14 +1123,17 @@ static long mtp_send_receive_ioctl(struct file *fp, unsigned int code, * in kernel context, which is necessary for vfs_read and * vfs_write to use our buffers in the kernel address space. */ dev->xfer_result = 0; if (dev->xfer_file_length) { queue_work(dev->wq, work); /* wait for operation to complete */ flush_workqueue(dev->wq); fput(filp); /* read the result */ smp_rmb(); } ret = dev->xfer_result; fput(filp); fail: spin_lock_irq(&dev->lock); Loading Loading
drivers/usb/gadget/function/f_mtp.c +10 −7 Original line number Diff line number Diff line Loading @@ -1123,14 +1123,17 @@ static long mtp_send_receive_ioctl(struct file *fp, unsigned int code, * in kernel context, which is necessary for vfs_read and * vfs_write to use our buffers in the kernel address space. */ dev->xfer_result = 0; if (dev->xfer_file_length) { queue_work(dev->wq, work); /* wait for operation to complete */ flush_workqueue(dev->wq); fput(filp); /* read the result */ smp_rmb(); } ret = dev->xfer_result; fput(filp); fail: spin_lock_irq(&dev->lock); Loading