HDFS-7489. Incorrect locking in FsVolumeList#checkDirs can hang datanodes (Noah Lorang via Colin P. McCabe)
(cherry picked from commit d8352b9b2b99aa46679c5880a724ba3f0ceb41ff)
(cherry picked from commit a037d6030b5ae9422fdb265f5e4880d515be9e37)