Copy link
@adilger

adilger May 20, 2016

Is there a lock protecting this increment? There doesn't strictly need to be a lock protecting it, since it is just a heuristic and at worst this might delay the rescanning by some amount (I think the worst case would be a factor of nr_active_cpus(), but probably much less).

That said, it would be helpful to have a comment here explaining that this is potentially racy but harmless (and the reason why), since it seems possible that static code analysis or observant coders might try to fix this by introducing locking here.