On Mon, Aug 29, 2022 at 12:41:30AM +0000, Tian, Kevin wrote: > > From: Jason Gunthorpe <jgg@xxxxxxxxxx> > > Sent: Thursday, August 18, 2022 12:07 AM > > > > Make it clear that this is the body of the ioctl - keep the mutex outside > > the function since this function doesn't have and wouldn't benefit from > > error unwind. > > but doing so make unset_container() unpair with set_container() and > be the only one doing additional things in main ioctl body. > > I'd prefer to moving mutex inside unset_container() for better readability. Yes, I tried both ways and ended up here since adding the goto unwind was kind of ungainly for this function. Don't mind either way The functions are not intended as strict pairs, they are ioctl dispatch functions. Jason