From: Lance Shelton Date: Mon, 16 Jul 2018 17:05:36 +0000 (-0400) Subject: Fix error code in nfs_lookup_verify_inode() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a61246c96195fc5f7500f6842e883b9eb1567d8d;p=openwrt%2Fstaging%2Fblogic.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;