That would create a race condition addressed at the bottom of the article: the process can get switched onto another CPU between the invocation of get_current_cpu_cache_line_size() and the invalidation.
An astute reader might realize that computing the cache line on every
invocation is not enough for user space code: It can happen that a process
gets scheduled on a different CPU while executing the __clear_cache
function with a certain cache line size, where it might not be valid
anymore.