And the things kick_inodes() does without any sort of locking lookkick_inodes() only works on inodes that first have undergone get_inodes() where we establish a refcount under inode_lock(). The final cleanup in kick_inodes() is done under iprune_mutex. You are looking at the loop that does writeback and invalidates attached dentries. This can fail for various reasons.
even more dangerous.
It should be the other way round: first make sure nothing is
referencing the inode, and _then_ start cleaning it up with
appropriate locks held. See prune_icache().