NFSv4: Fix return value in nfs_finish_open()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 9 Aug 2019 16:15:07 +0000 (12:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:16:56 +0000 (07:16 +0200)
commit4ac4f4716fba119a16b6a3ebe6bf345b9a32258b
treeada943650ce23e221e39b1d585181d9a7d7b342f
parentd7565d51af18bafd74a7e97519bb50bba0eb97aa
NFSv4: Fix return value in nfs_finish_open()

[ Upstream commit 9821421a291b548ef4369c6998745baa36ddecd5 ]

If the file turns out to be of the wrong type after opening, we want
to revalidate the path and retry, so return EOPENSTALE rather than
ESTALE.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/dir.c