lkml.org 
[lkml]   [2013]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount
On Mon, Sep 09, 2013 at 01:03:00AM +0100, Al Viro wrote:

> Well... unlazy_walk() is always followed by terminate_walk() very shortly,
> but there's a minor problem - terminate_walk() uses "are we in RCU
> mode?" for two things:
> a) do we need to do path_put() here?
> b) do we need to unlock?
> If you introduce the third case ("no need to do unlock and no need to
> do path_put()"), we'd better decide how to check for that case...
>
> I suspect that minimal variant would be along the lines of
> * have unlazy_walk() slap NULL into ->path.mnt on error, clear
> LOOKUP_RCU and unlock
> * have terminate_walk() check ->path.mnt before doing path_put()
> in !RCU case
> * in do_last() replace bool got_write with struct vfsmount *got_write,
> storing the reference to vfsmount we'd fed to mnt_want_write().
> And use its value when we call mnt_put_write() in there...
>
> I'll put together a commit like that on top of what I was going to push
> into public queues tonight; give me about half an hour, OK?

See the last commit in vfs.git#for-next (38373e1).


\
 
 \ /
  Last update: 2013-09-09 03:01    [W:0.142 / U:1.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site