Whamcloud - gitweb
LU-7782 scrub: handle slave obj of striped directory
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_compat.c
index 0fd606c..76c6483 100644 (file)
@@ -332,9 +332,19 @@ int osd_lookup_in_remote_parent(struct osd_thread_info *oti,
        if (IS_ERR(bh)) {
                rc = PTR_ERR(bh);
        } else {
-               rc = 0;
+               struct inode *inode;
+
                osd_id_gen(id, le32_to_cpu(de->inode), OSD_OII_NOGEN);
                brelse(bh);
+               inode = osd_iget(oti, osd, id);
+               if (IS_ERR(inode)) {
+                       rc = PTR_ERR(inode);
+                       if (rc == -ESTALE)
+                               rc = -ENOENT;
+               } else {
+                       iput(inode);
+                       rc = 0;
+               }
        }
        mutex_unlock(&parent->d_inode->i_mutex);
        if (rc == 0)