From a61246c96195fc5f7500f6842e883b9eb1567d8d Mon Sep 17 00:00:00 2001 From: Lance Shelton Date: Mon, 16 Jul 2018 13:05:36 -0400 Subject: [PATCH] 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 --- fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2