From: Al Viro Date: Sat, 9 Jun 2012 23:52:19 +0000 (-0400) Subject: coda: use list_for_each_entry X-Git-Tag: v3.6-rc1~18^2~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d674107ea4b68669e012e654d64369b7f2bb250;p=platform%2Fkernel%2Flinux-3.10.git coda: use list_for_each_entry Signed-off-by: Al Viro --- diff --git a/fs/coda/cache.c b/fs/coda/cache.c index 6901578..958ae0e 100644 --- a/fs/coda/cache.c +++ b/fs/coda/cache.c @@ -89,17 +89,13 @@ int coda_cache_check(struct inode *inode, int mask) /* this won't do any harm: just flag all children */ static void coda_flag_children(struct dentry *parent, int flag) { - struct list_head *child; struct dentry *de; spin_lock(&parent->d_lock); - list_for_each(child, &parent->d_subdirs) - { - de = list_entry(child, struct dentry, d_u.d_child); + list_for_each_entry(de, &parent->d_subdirs, d_u.d_child) { /* don't know what to do with negative dentries */ - if ( ! de->d_inode ) - continue; - coda_flag_inode(de->d_inode, flag); + if (de->d_inode ) + coda_flag_inode(de->d_inode, flag); } spin_unlock(&parent->d_lock); return;