提交 3084ee95 编写于 作者: A Al Viro

affs: get rid of open-coded list_for_each_entry()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 049b3c10
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册