Whamcloud - gitweb
LU-9679 modules: convert MIN/MAX to kernel style
[fs/lustre-release.git] / lustre / mdd / mdd_permission.c
index 2b03de1..0857889 100644 (file)
@@ -62,8 +62,9 @@ int mdd_acl_chmod(const struct lu_env *env, struct mdd_object *o, __u32 mode,
        ENTRY;
 
        lu_buf_check_and_alloc(&mdd_env_info(env)->mti_xattr_buf,
-                       MIN(mdd_obj2mdd_dev(o)->mdd_dt_conf.ddp_max_ea_size,
-                           XATTR_SIZE_MAX));
+                       min_t(unsigned int,
+                             mdd_obj2mdd_dev(o)->mdd_dt_conf.ddp_max_ea_size,
+                             XATTR_SIZE_MAX));
        buf = mdd_env_info(env)->mti_xattr_buf;
        if (buf.lb_buf == NULL)
                RETURN(-ENOMEM);
@@ -217,8 +218,9 @@ static int mdd_check_acl(const struct lu_env *env, struct mdd_object *obj,
        ENTRY;
 
        lu_buf_check_and_alloc(&mdd_env_info(env)->mti_xattr_buf,
-                       MIN(mdd_obj2mdd_dev(obj)->mdd_dt_conf.ddp_max_ea_size,
-                           XATTR_SIZE_MAX));
+                       min_t(unsigned int,
+                             mdd_obj2mdd_dev(obj)->mdd_dt_conf.ddp_max_ea_size,
+                             XATTR_SIZE_MAX));
        buf = mdd_env_info(env)->mti_xattr_buf;
        if (buf.lb_buf == NULL)
                RETURN(-ENOMEM);