linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: autofs@linux.kernel.org, adilger@sun.com,
	linux-kernel@vger.kernel.org, hch@infradead.org,
	viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
	sage@newdream.net, yehuda@newdream.net
Subject: Re: [PATCH 01/10] autofs4 - use macros for active list handling
Date: Wed, 07 Oct 2009 11:50:59 +0800	[thread overview]
Message-ID: <4ACC1023.4050906@themaw.net> (raw)
In-Reply-To: <20091006134918.4d5dcbaf.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Thu, 01 Oct 2009 09:00:55 +0800
> Ian Kent <raven@themaw.net> wrote:
> 
>> Define some simple macro functions for adding and deleting entries
>> on the active (and unhashed) dentry list.
> 
> A "macro" is that thing which we create with #define.

OK, guilty, ;)

> 
>> +static void autofs4_add_active(struct dentry *dentry)
>> +{
>> +	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
>> +	struct autofs_info *ino = autofs4_dentry_ino(dentry);
>> +	if (ino) {
>> +		spin_lock(&sbi->lookup_lock);
>> +		if (!ino->active_count) {
>> +			if (list_empty(&ino->active))
>> +				list_add(&ino->active, &sbi->active_list);
>> +		}
>> +		ino->active_count++;
>> +		spin_unlock(&sbi->lookup_lock);
>> +	}
>> +	return;
>> +}
>> +
>> +static void autofs4_del_active(struct dentry *dentry)
>> +{
>> +	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
>> +	struct autofs_info *ino = autofs4_dentry_ino(dentry);
>> +	if (ino) {
>> +		spin_lock(&sbi->lookup_lock);
>> +		ino->active_count--;
>> +		if (!ino->active_count) {
>> +			if (!list_empty(&ino->active))
>> +				list_del_init(&ino->active);
>> +		}
>> +		spin_unlock(&sbi->lookup_lock);
>> +	}
>> +	return;
>> +}
> 
> These aren't macros!  I changed the titles and changelogs of patches 1,
> 2 and 3 to use the term "helper functions".

Thanks, heaps.
Ian

      reply	other threads:[~2009-10-07  3:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01  1:00 [PATCH 01/10] autofs4 - use macros for active list handling Ian Kent
2009-10-01  1:01 ` [PATCH 02/10] autofs4 - use macros for expiring list Ian Kent
2009-10-01  1:01 ` [PATCH 03/10] autofs4 - use macro for need mount check Ian Kent
2009-10-01  1:01 ` [PATCH 04/10] autofs4 - use autofs_info for pending flag Ian Kent
2009-10-01  1:01 ` [PATCH 05/10] autofs4 - renamer unhashed to active in autofs4_lookup() Ian Kent
2009-10-01  1:01 ` [PATCH 06/10] autofs4 - cleanup active and expire lookup Ian Kent
2009-10-01  1:01 ` [PATCH 07/10] autofs4 - eliminate d_unhashed in path walk checks Ian Kent
2009-10-01  1:01 ` [PATCH 08/10] autofs4 - rename dentry to active in autofs4_lookup_active() Ian Kent
2009-10-01  1:01 ` [PATCH 09/10] autofs4 - rename dentry to expiring in autofs4_lookup_expiring() Ian Kent
2009-10-01  1:02 ` [PATCH 10/10] autofs4 - always use lookup for lookup Ian Kent
2009-10-06 20:49 ` [PATCH 01/10] autofs4 - use macros for active list handling Andrew Morton
2009-10-07  3:50   ` Ian Kent [this message]

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=4ACC1023.4050906@themaw.net \
    --to=raven@themaw.net \
    --cc=adilger@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=autofs@linux.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sage@newdream.net \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=yehuda@newdream.net \
    /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;
as well as URLs for NNTP newsgroup(s).