affs: get rid of open-coded list_for_each_entry()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
049b3c10ee
commit
3084ee95f0
@ -126,18 +126,13 @@ affs_fix_dcache(struct dentry *dentry, u32 entry_ino)
|
|||||||
{
|
{
|
||||||
struct inode *inode = dentry->d_inode;
|
struct inode *inode = dentry->d_inode;
|
||||||
void *data = dentry->d_fsdata;
|
void *data = dentry->d_fsdata;
|
||||||
struct list_head *head, *next;
|
|
||||||
|
|
||||||
spin_lock(&inode->i_lock);
|
spin_lock(&inode->i_lock);
|
||||||
head = &inode->i_dentry;
|
list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
|
||||||
next = head->next;
|
|
||||||
while (next != head) {
|
|
||||||
dentry = list_entry(next, struct dentry, d_alias);
|
|
||||||
if (entry_ino == (u32)(long)dentry->d_fsdata) {
|
if (entry_ino == (u32)(long)dentry->d_fsdata) {
|
||||||
dentry->d_fsdata = data;
|
dentry->d_fsdata = data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
next = next->next;
|
|
||||||
}
|
}
|
||||||
spin_unlock(&inode->i_lock);
|
spin_unlock(&inode->i_lock);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user