On Mon, Feb 04, 2019 at 05:42:03AM -0800, Matthew Wilcox wrote: > On Mon, Feb 04, 2019 at 04:20:44PM +0300, Dan Carpenter wrote: > > > > - if (!nrange->blockable && !mutex_trylock(&hmm->lock)) { > > - ret = -EAGAIN; > > - goto out; > > + if (!nrange->blockable) { > > + if (!mutex_trylock(&hmm->lock)) { > > + ret = -EAGAIN; > > + goto out; > > + } > > } else > > mutex_lock(&hmm->lock); > > I think this would be more readable written as: > > ret = -EAGAIN; > if (nrange->blockable) > mutex_lock(&hmm->lock); > else if (!mutex_trylock(&hmm->lock)) > goto out; I agree, that does look nicer. I will resend. regards, dan carpenter