lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4ACC1023.4050906@themaw.net>
Date:	Wed, 07 Oct 2009 11:50:59 +0800
From:	Ian Kent <raven@...maw.net>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-kernel@...r.kernel.org, autofs@...ux.kernel.org,
	linux-fsdevel@...r.kernel.org, sage@...dream.net,
	viro@...IV.linux.org.uk, adilger@....com, hch@...radead.org,
	yehuda@...dream.net
Subject: Re: [PATCH 01/10] autofs4 - use macros for active list handling

Andrew Morton wrote:
> On Thu, 01 Oct 2009 09:00:55 +0800
> Ian Kent <raven@...maw.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ