aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/inode.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 0116d06731c2..5bc97507eeaa 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -282,6 +282,13 @@ static void dispose_list(struct list_head *head)
282 if (inode->i_data.nrpages) 282 if (inode->i_data.nrpages)
283 truncate_inode_pages(&inode->i_data, 0); 283 truncate_inode_pages(&inode->i_data, 0);
284 clear_inode(inode); 284 clear_inode(inode);
285
286 spin_lock(&inode_lock);
287 hlist_del_init(&inode->i_hash);
288 list_del_init(&inode->i_sb_list);
289 spin_unlock(&inode_lock);
290
291 wake_up_inode(inode);
285 destroy_inode(inode); 292 destroy_inode(inode);
286 nr_disposed++; 293 nr_disposed++;
287 } 294 }
@@ -317,8 +324,6 @@ static int invalidate_list(struct list_head *head, struct list_head *dispose)
317 inode = list_entry(tmp, struct inode, i_sb_list); 324 inode = list_entry(tmp, struct inode, i_sb_list);
318 invalidate_inode_buffers(inode); 325 invalidate_inode_buffers(inode);
319 if (!atomic_read(&inode->i_count)) { 326 if (!atomic_read(&inode->i_count)) {
320 hlist_del_init(&inode->i_hash);
321 list_del(&inode->i_sb_list);
322 list_move(&inode->i_list, dispose); 327 list_move(&inode->i_list, dispose);
323 inode->i_state |= I_FREEING; 328 inode->i_state |= I_FREEING;
324 count++; 329 count++;
@@ -439,8 +444,6 @@ static void prune_icache(int nr_to_scan)
439 if (!can_unuse(inode)) 444 if (!can_unuse(inode))
440 continue; 445 continue;
441 } 446 }
442 hlist_del_init(&inode->i_hash);
443 list_del_init(&inode->i_sb_list);
444 list_move(&inode->i_list, &freeable); 447 list_move(&inode->i_list, &freeable);
445 inode->i_state |= I_FREEING; 448 inode->i_state |= I_FREEING;
446 nr_pruned++; 449 nr_pruned++;