public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Aloni <da-x@gmx.net>
To: Maneesh Soni <maneesh@in.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dcache.{c,h} cleanup
Date: Fri, 31 May 2002 16:03:21 +0300	[thread overview]
Message-ID: <20020531130321.GA22523@callisto.yi.org> (raw)
In-Reply-To: <20020531082806.GA4053@callisto.yi.org> <200205310919.g4V9JgA22954@northrelay01.pok.ibm.com>

On Fri, May 31, 2002 at 02:56:23PM +0530, Maneesh Soni wrote:
> On Fri, 31 May 2002 14:02:07 +0530, Dan Aloni wrote:
> 
> >  + use d_unhashed() instead of list_empty(&dentry->d_hash) 
> There are few more list_empty(...->d_hash)s left 
> 
> fs/intermezzo/journal.c presto_path   
> fs/libfs.c              dcache_dir_lseek  
> fs/libfs.c              dcache_readdir    
> kernel/exit.c           __unhash_process  

I'll send a patch to rusty.

> >  	if (dentry->d_op && dentry->d_op->d_delete) {
> >  		if (dentry->d_op->d_delete(dentry))
> > -			goto unhash_it;
> > +			goto kill_it;
> >  	}
> >  	/* Unreachable? Get rid of it */
> > -	if (list_empty(&dentry->d_hash))
> > +	if (d_unhashed(dentry))
> >  		goto kill_it;
> 		^^^^^^^^^^^^^
> This will do list_del_init on a already unhashed dentry.
> 

I am awake of this. From what I've seen, a second list_del_init 
is a no-op, and this one-liner doesn't yell 'refactor me'.

> > -unhash_it:
> > -	list_del_init(&dentry->d_hash);
> > +kill_it:
> > +	parent = d_release(dentry);
> > +	if (dentry == parent)

-- 
Dan Aloni
da-x@gmx.net

  parent reply	other threads:[~2002-05-31 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-31  8:28 [PATCH] dcache.{c,h} cleanup Dan Aloni
     [not found] ` <200205310919.g4V9JgA22954@northrelay01.pok.ibm.com>
2002-05-31 13:03   ` Dan Aloni [this message]
2002-06-03  7:32 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020531130321.GA22523@callisto.yi.org \
    --to=da-x@gmx.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox