lkml.org 
[lkml]   [2014]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] dcache: fix d_splice_alias handling of aliases
From
On Thu, Jan 16, 2014 at 4:41 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> And, sorry, I did miss that you said "non-directory". But I think you
> have that backwards: d_splice_alias looks like:
>
> if (inode && S_ISDIR(inode->i_mode)) {
> ...
> } else {
> d_instantiate(dentry, inode);
> if (d_unhashed(dentry))
> d_rehash(dentry);
> }
>
> So it ignores any existing aliases in the non-directory case.

Okay.

>
> d_materialise_unique by contrast calls __d_instantiate_unique, which
> looks like it should avoid adding duplicates.
>
> So I think switching everyone to d_materialiase_unique would result in
> fewer dentries. But I've never seen any complaint about the issue and
> like you don't see a reason this would matter much either way.

So, yes, d_materialise_unique() looks like it has superior
functionality compared to d_splice_alias().

Thanks,
Miklos


\
 
 \ /
  Last update: 2014-01-16 17:41    [W:0.049 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site