mm: make get_scan_ratio() safe for memcg