Skip to content

Commit

Permalink
affs: get rid of open-coded list_for_each_entry()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 14, 2012
1 parent 049b3c1 commit 3084ee9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/affs/amigaffs.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,13 @@ affs_fix_dcache(struct dentry *dentry, u32 entry_ino)
{
struct inode *inode = dentry->d_inode;
void *data = dentry->d_fsdata;
struct list_head *head, *next;

spin_lock(&inode->i_lock);
head = &inode->i_dentry;
next = head->next;
while (next != head) {
dentry = list_entry(next, struct dentry, d_alias);
list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
if (entry_ino == (u32)(long)dentry->d_fsdata) {
dentry->d_fsdata = data;
break;
}
next = next->next;
}
spin_unlock(&inode->i_lock);
}
Expand Down

0 comments on commit 3084ee9

Please sign in to comment.