Re: [PATCH v2 11/17] locks: move freeing of leases outside of i_lock

Jeff Layton
2014-09-05T14:03:31Z

On Thu, 4 Sep 2014 10:50:14 -0700
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, Sep 04, 2014 at 08:38:37AM -0400, Jeff Layton wrote:
> > There was only one place where we still could free a file_lock while
> > holding the i_lock -- lease_modify. Add a new list_head argument to the
> > lm_change operation, pass in a private list when calling it, and fix
> > those callers to dispose of the list once the lock has been dropped.
>
> As mentioned I don't see a real need for this, but it does look correct
> to me.
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Yeah, it's not strictly necessary, but I think it simplifies the API
for potential users. We already have the infrastructure to handle
deferring file_lock removal so we might as well take advantage of it
here too.

--
Jeff Layton <jlayton@primarydata.com>