fs: Factor inode hash operations into functions