Re: read / write / close sync for device files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 04, 2011 at 06:13:49PM +0530, Amit Nagal wrote:
> Hi ,
> 
> if  a application is  doing read /write I/O with a  usb device ,  in 2
> different threads in userspace ,

What type of USB device?

> and at usb disconnect event ,  read thread returns with error and
> application calls close() subsequently without waiting for write
> thread to finish .
> 
> Do  the VFS upper layers  maintain locks that  take care that until
> both read and write methods in usb driver donot finish and return with
> error in kernel space
> 
> close will pend and usb driver release method will not be called ?

No, close will succeed, and then all will be cleaned up properly.

Try it yourself and see :)

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux