Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / mdd / mdd_object.c
index c10d4bc..9240034 100644 (file)
@@ -664,7 +664,7 @@ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj,
                                       (tmp_la->la_mode & ~S_IALLUGO);
 
                 /* Also check the setgid bit! */
-                if (!mdd_in_group_p(uc, (la->la_valid & LA_GID) ? la->la_gid :
+                if (!lustre_in_group_p(uc, (la->la_valid & LA_GID) ? la->la_gid :
                                 tmp_la->la_gid) && !mdd_capable(uc, CAP_FSETID))
                         la->la_mode &= ~S_ISGID;
         } else {
@@ -704,7 +704,7 @@ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj,
                         la->la_gid = tmp_la->la_gid;
                 if (((uc->mu_fsuid != tmp_la->la_uid) ||
                     ((la->la_gid != tmp_la->la_gid) &&
-                    !mdd_in_group_p(uc, la->la_gid))) &&
+                    !lustre_in_group_p(uc, la->la_gid))) &&
                     !mdd_capable(uc, CAP_CHOWN))
                         RETURN(-EPERM);
 
@@ -1407,8 +1407,8 @@ static int __mdd_readpage(const struct lu_env *env, struct mdd_object *obj,
          */
         iops = &next->do_index_ops->dio_it;
         it = iops->init(env, next, 0, mdd_object_capa(env, obj));
-        if (it == NULL)
-                return -ENOMEM;
+        if (IS_ERR(it))
+                return PTR_ERR(it);
 
         rc = iops->load(env, it, rdpg->rp_hash);