Re: [PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags V2

2011-05-26 Thread Al Viro
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)) > >> +

Re: [PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags V2

2011-05-23 Thread Josef Bacik
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; >> +dpu

Re: [PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags V2

2011-05-21 Thread Al Viro
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

[PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags V2

2011-05-20 Thread Josef Bacik
Btrfs (and I'd venture most other fs's) stores its indexes in nice disk order for readdir, but unfortunately in the case of anything that stats the files in order that readdir spits back (like oh say ls) that means we still have to do the normal lookup of the file, which means looking up our other