Commit 1d674107ea4b68669e012e654d64369b7f2bb250

Authored by Al Viro
1 parent b3d9b7a3c7

coda: use list_for_each_entry

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 1 changed file with 3 additions and 7 deletions Side-by-side Diff

... ... @@ -89,17 +89,13 @@
89 89 /* this won't do any harm: just flag all children */
90 90 static void coda_flag_children(struct dentry *parent, int flag)
91 91 {
92   - struct list_head *child;
93 92 struct dentry *de;
94 93  
95 94 spin_lock(&parent->d_lock);
96   - list_for_each(child, &parent->d_subdirs)
97   - {
98   - de = list_entry(child, struct dentry, d_u.d_child);
  95 + list_for_each_entry(de, &parent->d_subdirs, d_u.d_child) {
99 96 /* don't know what to do with negative dentries */
100   - if ( ! de->d_inode )
101   - continue;
102   - coda_flag_inode(de->d_inode, flag);
  97 + if (de->d_inode )
  98 + coda_flag_inode(de->d_inode, flag);
103 99 }
104 100 spin_unlock(&parent->d_lock);
105 101 return;