summaryrefslogtreecommitdiff
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorLance Shelton <lance.shelton@hammerspace.com>2018-07-16 13:05:36 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-07-26 16:25:25 -0400
commita61246c96195fc5f7500f6842e883b9eb1567d8d (patch)
treefac1ee2518b55d751a1e0e727c1c4cbeae9e3d8d /fs/nfs/dir.c
parent3825827ebf9973600347b16e848f3de52262ab6b (diff)
downloadlwn-a61246c96195fc5f7500f6842e883b9eb1567d8d.tar.gz
lwn-a61246c96195fc5f7500f6842e883b9eb1567d8d.zip
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 <lance.shelton@hammerspace.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 1 insertions, 1 deletions
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;