summaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-09 13:03:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 16:32:52 +0400
commit3084ee95f08ce353ae26c18c7627c4e9786983ca (patch)
tree29e3d4a7f76405ad44696d66dabef1ed46b18435 /fs/affs
parent049b3c10eecd0a5f3605fa3cd13f638593213ccb (diff)
downloadlinux-3084ee95f08ce353ae26c18c7627c4e9786983ca.tar.gz
linux-3084ee95f08ce353ae26c18c7627c4e9786983ca.tar.bz2
linux-3084ee95f08ce353ae26c18c7627c4e9786983ca.zip
affs: get rid of open-coded list_for_each_entry()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs')
-rw-r--r--fs/affs/amigaffs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 52a6407682e6..1c7fd7928d1f 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -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);
}