Whamcloud - gitweb
LU-4665 utils: lfs setstripe to specify OSTs
[fs/lustre-release.git] / lustre / mdt / mdt_xattr.c
index f5a12f9..9678397 100644 (file)
@@ -45,6 +45,7 @@
 
 #define DEBUG_SUBSYSTEM S_MDS
 
+#include <linux/xattr.h>
 #include <lustre_acl.h>
 #include "mdt_internal.h"
 
@@ -95,12 +96,13 @@ static int mdt_getxattr_pack_reply(struct mdt_thread_info * info)
                 RETURN(-EINVAL);
         }
 
-        if (size == -ENODATA) {
-                size = 0;
-        } else if (size < 0) {
-                CERROR("Error geting EA size: %d\n", size);
-                RETURN(size);
-        }
+       if (size == -ENODATA) {
+               size = 0;
+       } else if (size < 0) {
+               if (size != -EOPNOTSUPP)
+                       CERROR("Error geting EA size: %d\n", size);
+               RETURN(size);
+       }
 
         req_capsule_set_size(pill, &RMF_EADATA, RCL_SERVER,
                             info->mti_body->mbo_eadatasize == 0 ? 0 : size);
@@ -127,10 +129,8 @@ mdt_getxattr_one(struct mdt_thread_info *info,
        CDEBUG(D_INODE, "getxattr %s\n", xattr_name);
 
        rc = mo_xattr_get(info->mti_env, next, buf, xattr_name);
-       if (rc < 0) {
-               CERROR("getxattr failed: %d\n", rc);
+       if (rc < 0)
                GOTO(out, rc);
-       }
 
        if (info->mti_body->mbo_valid &
            (OBD_MD_FLRMTLSETFACL | OBD_MD_FLRMTLGETFACL))
@@ -377,7 +377,7 @@ int mdt_reint_setxattr(struct mdt_thread_info *info,
         CDEBUG(D_INODE, "setxattr for "DFID"\n", PFID(rr->rr_fid1));
 
        if (info->mti_dlm_req)
-               ldlm_request_cancel(req, info->mti_dlm_req, 0);
+               ldlm_request_cancel(req, info->mti_dlm_req, 0, LATF_SKIP);
 
         if (OBD_FAIL_CHECK(OBD_FAIL_MDS_SETXATTR))
                 RETURN(err_serious(-ENOMEM));