[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] please pull file-locking related changes for v3.20
On Tue, 17 Feb 2015 11:13:39 -0800
Linus Torvalds <> wrote:

> On Tue, Feb 17, 2015 at 11:08 AM, J. Bruce Fields <> wrote:
> >
> > I agree that it's weird, but I think it's what we're stuck with.
> And if by "weird" you mean "flock is really not a well-defined or sane
> interface", I'll agree with you.
> That said, I'm not at all sure about the "we're stuck with it". We can
> improve the semantics without anybody noticing, because it's not like
> anybody could *depend* on the weaker semantics - they needed
> particular races and timings to hit anyway.
> Linus

I'm not sure we want to make that change here and now though. That's
something that really ought to be approached a bit more carefully since
we might break some userland apps that depend on this (admittedly
strange) behavior.

What about this instead then?

- leave the "drop the spinlock" thing in place in flock_lock_file for

- change locks_remove_flock to just walk the list and delete any locks
associated with the filp being closed

That should pretty closely mirror the behavior of v3.19.

Yes, that leaves the bug in place where you can end up with two locks
associated with the same filp, but that's the way it has worked now for
years. I'm leery of changing that behavior in the context of this set.

Jeff Layton <>

 \ /
  Last update: 2015-02-17 20:41    [W:0.087 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site