Fix error code in nfs_lookup_verify_inode()
authorLance Shelton <lance.shelton@hammerspace.com>
Mon, 16 Jul 2018 17:05:36 +0000 (13:05 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 26 Jul 2018 20:25:25 +0000 (16:25 -0400)
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>
fs/nfs/dir.c

index f0e39583af7e360759680d9dacf2634d0bc237c5..a004b8fc02da34cebc036450a6d14268079da779 100644 (file)
@@ -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;