HDFS-5372. In FSNamesystem, hasReadLock() returns false if the current thread holds the write lock (Contributed by Vinay)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.2@1543087 13f79535-47bb-0310-9956-ffa450edef68
HADOOP-10109. Fix test failure in TestOfflineEditsViewer introduced by HADOOP-10052 (cmccabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.2@1543125 13f79535-47bb-0310-9956-ffa450edef68