Dave Chinner 02afc410f3 fs: Lock the inode LRU list separately
Introduce the inode_lru_lock to protect the inode_lru list. This
lock is nested inside the inode->i_lock to allow the inode to be
added to the LRU list in iput_final without needing to deal with
lock inversions. This keeps iput_final() clean and neat.

Further, where marking the inode I_FREEING and removing it from the
LRU, move the LRU list manipulation within the inode->i_lock to keep
the list manipulation consistent with iput_final. This also means
that most of the open coded LRU list removal + unused inode
accounting can now use the inode_lru_list_del() wrappers which
cleans the code up further.

However, this locking change means what the LRU traversal in
prune_icache() inverts this lock ordering and needs to use trylock
semantics on the inode->i_lock to avoid deadlocking. In these cases,
if we fail to lock the inode we move it to the back of the LRU to
prevent spinning on it.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-03-24 21:16:31 -04:00
..
2011-03-17 14:02:57 +01:00
2011-02-25 11:12:37 -08:00
2011-02-21 22:31:47 +00:00
2011-03-10 13:22:34 -06:00
2011-03-03 01:28:17 -05:00
2011-01-14 09:23:36 -08:00
2011-03-02 22:27:36 +01:00
2011-03-17 14:02:57 +01:00
2011-03-21 00:45:50 -04:00
2011-03-17 14:02:57 +01:00
2011-03-03 01:28:16 -05:00
2011-03-23 19:46:19 -07:00
2011-03-23 19:46:19 -07:00
2011-03-21 00:16:09 -04:00
2011-03-15 02:21:44 -04:00
2011-03-24 21:16:31 -04:00
2011-03-21 00:16:08 -04:00
2011-01-13 17:32:32 -08:00
2011-03-21 01:10:41 -04:00
2011-03-14 09:15:28 -04:00