Re: [PATCH 1/3] dcache: use IS_ROOT to decide where dentry is hashed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 06, 2013 at 11:43:48AM -0400, J. Bruce Fields wrote:
> diff --git a/fs/dcache.c b/fs/dcache.c
> index b949af8..934f02d 100644
> --- a/fs/dcache.c
> +++ b/fs/dcache.c
> @@ -393,7 +393,7 @@ static void __d_shrink(struct dentry *dentry)
>  {
>  	if (!d_unhashed(dentry)) {
>  		struct hlist_bl_head *b;
> -		if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED))
> +		if (unlikely(IS_ROOT(dentry)))

I think this needs a comment about why the IS_ROOT check is fine,
destilled from your commit log.

Also while reviewing this I noticed that one of the two callers of
__d_shrink already has the d_unhashed check - it might make sense to
move it to the other caller as well if you touch this area anyway.
(as a separate patch).

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux