From: Lance Shelton Date: Mon, 16 Jul 2018 17:05:36 +0000 (-0400) Subject: Fix error code in nfs_lookup_verify_inode() X-Git-Tag: v4.19-rc1~33^2~42 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a61246c96195fc5f7500f6842e883b9eb1567d8d;p=uclinux-h8%2Flinux.git Fix error code in nfs_lookup_verify_inode() Return -ESTALE to force a lookup when the file has no more links Signed-off-by: Lance Shelton Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index f0e39583af7e..a004b8fc02da 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1038,7 +1038,7 @@ int nfs_lookup_verify_inode(struct inode *inode, unsigned int flags) if (flags & LOOKUP_REVAL) goto out_force; out: - return (inode->i_nlink == 0) ? -ENOENT : 0; + return (inode->i_nlink == 0) ? -ESTALE : 0; out_force: if (flags & LOOKUP_RCU) return -ECHILD;