From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: [PATCH] fs/dcache: use standard list macro for d_find_alias Date: Fri, 17 Dec 2010 12:53:55 -0500 Message-ID: <20101217175355.GA11515@fieldses.org> References: <20101112184353.GA32745@fieldses.org> <20101115174837.GB10044@fieldses.org> <20101129193248.GA9897@fieldses.org> <20101203223326.GB28763@fieldses.org> <20101213051944.GA8688@amd> <20101214220102.GM24828@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , Nick Piggin , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Nick Piggin Return-path: Content-Disposition: inline In-Reply-To: <20101214220102.GM24828-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org From: J. Bruce Fields Signed-off-by: J. Bruce Fields --- fs/dcache.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) While I'm here.... Am I overlooking some reason we're not doing this the easy way? diff --git a/fs/dcache.c b/fs/dcache.c index 23702a9..5ed93cd 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -358,16 +358,9 @@ EXPORT_SYMBOL(dget_locked); static struct dentry * __d_find_alias(struct inode *inode, int want_discon) { - struct list_head *head, *next, *tmp; struct dentry *alias, *discon_alias=NULL; - head = &inode->i_dentry; - next = inode->i_dentry.next; - while (next != head) { - tmp = next; - next = tmp->next; - prefetch(next); - alias = list_entry(tmp, struct dentry, d_alias); + list_for_each_entry(alias, &inode->i_dentry, d_alias) { if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) { if (IS_ROOT(alias) && (alias->d_flags & DCACHE_DISCONNECTED)) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html