HDFS-7387. NFS may only do partial commit due to a race between COMMIT and write. Contributed by Brandon Li

(cherry picked from commit 99d9d0c2d19b9f161b765947f3fb64619ea58090)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java

(cherry picked from commit 0c3b7887e6a249bcab6c766137adcaea8afe1c67)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

(cherry picked from commit d0ca88c5a197120e010356547df5a4a0825f824a)
HDFS-7387. Merging to branch-2.6 for hadoop-2.6.0-rc1.

(cherry picked from commit 09f36b1688a375f45c19889e326d5d35249882b1)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

(cherry picked from commit 42849e5077bd659ac1244c4710a9858215d8abcc)