Whamcloud - gitweb
LU-8569 linkea: linkEA size limitation
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_handler.c
index e284977..4c2e495 100644 (file)
@@ -3898,7 +3898,6 @@ static int osd_xattr_set(const struct lu_env *env, struct dt_object *dt,
 
        if (strcmp(name, XATTR_NAME_LMV) == 0) {
                struct lustre_mdt_attrs *lma = &info->oti_mdt_attrs;
-               int                      rc;
 
                rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
                if (rc != 0)
@@ -3912,10 +3911,6 @@ static int osd_xattr_set(const struct lu_env *env, struct dt_object *dt,
                        RETURN(rc);
        }
 
-       if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_LINKEA_OVERFLOW) &&
-           strcmp(name, XATTR_NAME_LINK) == 0)
-               return -ENOSPC;
-
        rc = __osd_xattr_set(info, inode, name, buf->lb_buf, buf->lb_len,
                               fs_flags);
        osd_trans_exec_check(env, handle, OSD_OT_XATTR_SET);
@@ -5039,8 +5034,8 @@ again:
        }
 
        ldata.ld_buf = buf;
-       rc = linkea_init(&ldata);
-       if (rc == 0) {
+       rc = linkea_init_with_rec(&ldata);
+       if (!rc) {
                linkea_first_entry(&ldata);
                linkea_entry_unpack(ldata.ld_lee, &ldata.ld_reclen, NULL, fid);
        }
@@ -5083,8 +5078,8 @@ again:
        }
 
        ldata.ld_buf = buf;
-       rc = linkea_init(&ldata);
-       if (rc == 0)
+       rc = linkea_init_with_rec(&ldata);
+       if (!rc)
                rc = linkea_links_find(&ldata, &cname, pfid);
 
        RETURN(rc);