Whamcloud - gitweb
LU-5047 tests: correct cleanup files in sanity.sh
[fs/lustre-release.git] / lustre / mdt / mdt_xattr.c
index 1abef7e..55f0520 100644 (file)
@@ -101,10 +101,6 @@ static int mdt_getxattr_pack_reply(struct mdt_thread_info * info)
                 RETURN(size);
         }
 
-        if (info->mti_body->eadatasize != 0 &&
-            info->mti_body->eadatasize < size)
-                RETURN(-ERANGE);
-
         req_capsule_set_size(pill, &RMF_EADATA, RCL_SERVER,
                              info->mti_body->eadatasize == 0 ? 0 : size);
         rc = req_capsule_server_pack(pill);
@@ -423,10 +419,8 @@ int mdt_reint_setxattr(struct mdt_thread_info *info,
                    strcmp(xattr_name, XATTR_NAME_LFSCK_NAMESPACE) == 0)
                        GOTO(out, rc = 0);
        } else if ((valid & OBD_MD_FLXATTR) &&
-                  (strncmp(xattr_name, XATTR_NAME_ACL_ACCESS,
-                           sizeof(XATTR_NAME_ACL_ACCESS) - 1) == 0 ||
-                   strncmp(xattr_name, XATTR_NAME_ACL_DEFAULT,
-                           sizeof(XATTR_NAME_ACL_DEFAULT) - 1) == 0)) {
+                  (strcmp(xattr_name, XATTR_NAME_ACL_ACCESS) == 0 ||
+                   strcmp(xattr_name, XATTR_NAME_ACL_DEFAULT) == 0)) {
                /* currently lustre limit acl access size */
                if (xattr_len > LUSTRE_POSIX_ACL_MAX_SIZE)
                        GOTO(out, rc = -ERANGE);