On 14-06-13 05:03 AM, Christoph Hellwig wrote: > Hi Doug, > > this looks generally good to me, but I don't think open_cnt and exclude > have to use atomic_t, as they are only ever modified under open_rel_lock. > > Can you take a look at the version below? This changes open_cnt to an > int, exclude to a bool, removes the open_cnt underflow check that > the VFS takes care for, and streamlines the open path a little bit: As a follow-up attached is a first cut of replacing the locks around sg_request::done with an atomic. It assumes the patch from Christoph earlier in this thread. The interesting part is the removal of the write lock in the completion part of the SG_IO ioctl. Testing ongoing. Doug Gilbert