]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
coda: use list_for_each_entry
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 Jun 2012 23:52:19 +0000 (19:52 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Jul 2012 12:32:56 +0000 (16:32 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/coda/cache.c

index 6901578761841ae6c0ed950c26de2cf64c9d1389..958ae0e0ff8c0d55d5ef18001154f56e3cb273ce 100644 (file)
@@ -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;