[PATCH] locks: breaking read lease should not block read open

J. Bruce Fields bfields at fieldses.org
Wed Nov 23 12:08:51 MST 2011


On Wed, Nov 23, 2011 at 12:30:57AM +0000, Jamie Lokier wrote:
> J. Bruce Fields wrote:
> > > Fyi, fanotify is also synchronous:
> > 
> > Oh, I didn't know that, apologies for the confusion.
> > 
> > > It blocks the conflicting operation
> > > until the fanotify-using application allows it to proceed - or
> > > alternatively it can prevent the conflicting operating from proceeding
> > > at all.
> > 
> > Just grepping for "fsnotify" (which fanotify is built on?) I find a lot
> > of hooks in the vfs that all appear to have void returns and to be
> > called after the operation is done.  How does it fail an operation?  No
> > doubt I'm missing something.
> 
> The hook is fsnotify_perm(), called in security/security.c.

Got it.

Hm, we could almost move a lease_break() call in there.  We wouldn't
want it turning into a no-op in the absence of CONFIG_SECURITY, though.

--b.


More information about the samba-technical mailing list