Whamcloud - gitweb
LU-12137 llite: use ->iterate_shared() for readdir
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_scrub.c
index adabfd3..9166eda 100644 (file)
@@ -2022,7 +2022,7 @@ static int osd_ios_lf_fill(void *buf,
                RETURN(0);
 
        scrub->os_lf_scanned++;
-       child = osd_ios_lookup_one_len(dev, name, parent, namelen);
+       child = osd_lookup_one_len_unlocked(dev, name, parent, namelen);
        if (IS_ERR(child)) {
                CDEBUG(D_LFSCK, "%s: cannot lookup child '%.*s': rc = %d\n",
                      osd_name(dev), namelen, name, (int)PTR_ERR(child));
@@ -2096,8 +2096,8 @@ static int osd_ios_varfid_fill(void *buf,
        if (name[0] == '.')
                RETURN(0);
 
-       child = osd_ios_lookup_one_len(dev, name, fill_buf->oifb_dentry,
-                                      namelen);
+       child = osd_lookup_one_len_unlocked(dev, name, fill_buf->oifb_dentry,
+                                           namelen);
        if (IS_ERR(child))
                RETURN(PTR_ERR(child));
 
@@ -2145,8 +2145,8 @@ static int osd_ios_dl_fill(void *buf,
        if (map->olm_name == NULL)
                RETURN(0);
 
-       child = osd_ios_lookup_one_len(dev, name, fill_buf->oifb_dentry,
-                                      namelen);
+       child = osd_lookup_one_len_unlocked(dev, name, fill_buf->oifb_dentry,
+                                           namelen);
        if (IS_ERR(child))
                RETURN(PTR_ERR(child));
 
@@ -2180,8 +2180,8 @@ static int osd_ios_uld_fill(void *buf,
        if (name[0] != '[')
                RETURN(0);
 
-       child = osd_ios_lookup_one_len(dev, name, fill_buf->oifb_dentry,
-                                      namelen);
+       child = osd_lookup_one_len_unlocked(dev, name, fill_buf->oifb_dentry,
+                                           namelen);
        if (IS_ERR(child))
                RETURN(PTR_ERR(child));
 
@@ -2231,8 +2231,8 @@ static int osd_ios_root_fill(void *buf,
        if (map->olm_name == NULL)
                RETURN(0);
 
-       child = osd_ios_lookup_one_len(dev, name, fill_buf->oifb_dentry,
-                                      namelen);
+       child = osd_lookup_one_len_unlocked(dev, name, fill_buf->oifb_dentry,
+                                           namelen);
        if (IS_ERR(child))
                RETURN(PTR_ERR(child));
        else if (!child->d_inode)
@@ -2282,11 +2282,7 @@ osd_ios_general_scan(struct osd_thread_info *info, struct osd_device *dev,
                buf.oifb_items = 0;
 #ifdef HAVE_DIR_CONTEXT
                buf.ctx.pos = filp->f_pos;
-#ifdef HAVE_ITERATE_SHARED
                rc = fops->iterate_shared(filp, &buf.ctx);
-#else
-               rc = fops->iterate(filp, &buf.ctx);
-#endif
                filp->f_pos = buf.ctx.pos;
 #else
                rc = fops->readdir(filp, &buf, filldir);
@@ -2322,8 +2318,8 @@ osd_ios_ROOT_scan(struct osd_thread_info *info, struct osd_device *dev,
         *      OI mapping crashed or lost also, then we have to give up under
         *      double failure cases. */
        scrub->os_convert_igif = 1;
-       child = osd_ios_lookup_one_len(dev, dot_lustre_name, dentry,
-                                      strlen(dot_lustre_name));
+       child = osd_lookup_one_len_unlocked(dev, dot_lustre_name, dentry,
+                                           strlen(dot_lustre_name));
        if (IS_ERR(child)) {
                if (PTR_ERR(child) != -ENOENT)
                        RETURN(PTR_ERR(child));
@@ -2395,8 +2391,8 @@ osd_ios_OBJECTS_scan(struct osd_thread_info *info, struct osd_device *dev,
                        RETURN(rc);
        }
 
-       child = osd_ios_lookup_one_len(dev, ADMIN_USR, dentry,
-                                      strlen(ADMIN_USR));
+       child = osd_lookup_one_len_unlocked(dev, ADMIN_USR, dentry,
+                                           strlen(ADMIN_USR));
        if (IS_ERR(child)) {
                rc = PTR_ERR(child);
        } else {
@@ -2409,8 +2405,8 @@ osd_ios_OBJECTS_scan(struct osd_thread_info *info, struct osd_device *dev,
        if (rc != 0 && rc != -ENOENT)
                GOTO(out, rc);
 
-       child = osd_ios_lookup_one_len(dev, ADMIN_GRP, dentry,
-                                      strlen(ADMIN_GRP));
+       child = osd_lookup_one_len_unlocked(dev, ADMIN_GRP, dentry,
+                                           strlen(ADMIN_GRP));
        if (IS_ERR(child))
                GOTO(out, rc = PTR_ERR(child));
 
@@ -2466,9 +2462,9 @@ static void osd_initial_OI_scrub(struct osd_thread_info *info,
                        continue;
                }
 
-               child = osd_ios_lookup_one_len(dev, map->olm_name,
-                                              osd_sb(dev)->s_root,
-                                              map->olm_namelen);
+               child = osd_lookup_one_len_unlocked(dev, map->olm_name,
+                                                   osd_sb(dev)->s_root,
+                                                   map->olm_namelen);
                if (PTR_ERR(child) == -ENOENT ||
                    (!IS_ERR(child) && !child->d_inode))
                        osd_scrub_refresh_mapping(info, dev, &map->olm_fid,