diff options
-rw-r--r-- | fs/affs/amigaffs.c | 7 |
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) | |||
126 | { | 126 | { |
127 | struct inode *inode = dentry->d_inode; | 127 | struct inode *inode = dentry->d_inode; |
128 | void *data = dentry->d_fsdata; | 128 | void *data = dentry->d_fsdata; |
129 | struct list_head *head, *next; | ||
130 | 129 | ||
131 | spin_lock(&inode->i_lock); | 130 | spin_lock(&inode->i_lock); |
132 | head = &inode->i_dentry; | 131 | list_for_each_entry(dentry, &inode->i_dentry, d_alias) { |
133 | next = head->next; | ||
134 | while (next != head) { | ||
135 | dentry = list_entry(next, struct dentry, d_alias); | ||
136 | if (entry_ino == (u32)(long)dentry->d_fsdata) { | 132 | if (entry_ino == (u32)(long)dentry->d_fsdata) { |
137 | dentry->d_fsdata = data; | 133 | dentry->d_fsdata = data; |
138 | break; | 134 | break; |
139 | } | 135 | } |
140 | next = next->next; | ||
141 | } | 136 | } |
142 | spin_unlock(&inode->i_lock); | 137 | spin_unlock(&inode->i_lock); |
143 | } | 138 | } |