Whamcloud - gitweb
LU-6235 scrub: replace the stale OI mapping
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_compat.c
index ca2dc18..9e0c0d7 100644 (file)
@@ -905,8 +905,11 @@ int osd_obj_map_lookup(struct osd_thread_info *info, struct osd_device *dev,
        brelse(bh);
 
        inode = osd_iget(info, dev, id);
-       if (IS_ERR(inode))
-               RETURN(PTR_ERR(inode));
+       if (IS_ERR(inode)) {
+               int rc = PTR_ERR(inode);
+
+               RETURN(rc == -ENOENT ? -ESTALE : rc);
+       }
 
        iput(inode);
        RETURN(0);