Re: [PATCH 09/10] locks: move freeing of leases outside of i_lock

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

 



On Sun, 24 Aug 2014 09:08:04 -0700
Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> On Sat, Aug 23, 2014 at 10:41:17AM -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.
> 
> Why do we care about locks held when simply freeing a piece of memory?
> 

That's all that's done now, but locks_free_lock can call
fl->fl_release_private. Currently, no filesystem sets that for leases,
but while we're in here we might as well make it possible for that to
block for all lock types since that's simpler than having different
rules for them.

It doesn't really cost us anything other than a bit of list
manipulation and reduces contention on the i_lock slightly.

-- 
Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux