I am sending patch that fixes the issue. It fixes the issue for me on Emacs' current master branch. The patch also cleanly applies to emacs-26 branch.
I tested using Mitchel Humpherys' repro method, i.e.
$ cd /path/to/emacs
$ ./src/emacs -Q lisp/*.el
[ M-x global-auto-revert-mode ]
$ for i in $(seq 30); do for f in lisp/*.el; do echo "; $i" >> $f; done; git commit -am "test $i"; done
Without the fix I could reproduce the issue, and with the fix I could not reproduce even if running the loop 100 times instead of 30. Emacs was reloading a lot of files very fast, but no locking errors happened in the shell which ran the loop.