On Mon, May 23, 2011 at 12:13:07PM -0400, Josef Bacik wrote: > On 05/21/2011 10:11 PM, Al Viro wrote: > > On Fri, May 20, 2011 at 01:44:30PM -0400, Josef Bacik wrote: > >> + if (unlikely(d_need_lookup(dentry))) { > >> + if (nameidata_dentry_drop_rcu(nd, dentry)) > >> + return -ECHILD; > >> + dput(dentry); > >> + dentry = NULL; > >> + goto retry; > > > > Yecchhh... How about simple goto unlazy; here instead and doing the rest > > there? Especially since you have the same kind of thing elsewhere in the > > same sucker. It had been bloody painful to untangle that thing; let's not > > add to the rat's nest that still remains... > > This is where I was a little confused, which is why I added this code. It > seems that having goto unlazy; will mean that we will come down to this > section > > if (unlikely(status <= 0 )) { > if (status < 0) { > dput(dentry); > return status; > } > if (!d_invalidate(dentry)) { > dput(dentry); > dentry = NULL; > need_reval = 1; > goto retry; > } > } > > and d_invalidate will unhash us so we won't find our new dentry in the cache > which makes this whole exercise useless. Is there a different way you'd > like > this cleaned up? Thanks, Not *into* the loop; just before the beginning of that loop. IOW, put if (dentry && unlikely(dentry->d_flags & DCACHE_NEED_LOOKUP)) { dput(dentry); dentry = NULL; } just before retry: instead of doing it in non-lazy branch. Voila - your code in the lazy branch becomes if (unlikely(dentry->d_flags & DCACHE_NEED_LOOKUP)) goto unlazy; and that's it. Can you resend it with such modifications? ObMemoryPressureIssues: I really hoped to get Dave's patch (per-sb shrinkers) in that cycle, but it'll probably have to wait for the next one... -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html