Description
This bug was discovered by vinayrpet in this comment.
In FSNamesystem, there are hasReadLock() and hasReadOrWriteLock(). However, when a thread holds the write lock, the read lock is not required for reading data. So hasReadLock() and hasReadOrWriteLock() actually are the same.