Re: [PATCH 01/10] autofs4 - use macros for active list handling

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

 



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

> +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".

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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux