HDFS-7045. Fix NameNode deadlock when opening file under /.reserved path. Contributed by Yi Liu.

(cherry picked from commit 1e684995d7ac20d1c27ca1c1bef37dd2ee00e630)