Whamcloud - gitweb
LU-9679 modules: convert MIN/MAX to kernel style
[fs/lustre-release.git] / lustre / mdc / mdc_request.c
index a46b44b..4e503fe 100644 (file)
@@ -39,9 +39,7 @@
 #include <linux/user_namespace.h>
 #include <linux/utsname.h>
 #include <linux/delay.h>
-#ifdef HAVE_UIDGID_HEADER
-# include <linux/uidgid.h>
-#endif
+#include <linux/uidgid.h>
 
 #include <lustre_errno.h>
 
@@ -240,8 +238,9 @@ again:
        rc = mdc_getattr_common(exp, req);
        if (rc) {
                if (rc == -ERANGE) {
-                       acl_bufsize = MIN(imp->imp_connect_data.ocd_max_easize,
-                                         XATTR_SIZE_MAX);
+                       acl_bufsize = min_t(__u32,
+                                           imp->imp_connect_data.ocd_max_easize,
+                                           XATTR_SIZE_MAX);
                        mdc_reset_acl_req(req);
                        goto again;
                }
@@ -295,8 +294,9 @@ again:
        rc = mdc_getattr_common(exp, req);
        if (rc) {
                if (rc == -ERANGE) {
-                       acl_bufsize = MIN(imp->imp_connect_data.ocd_max_easize,
-                                         XATTR_SIZE_MAX);
+                       acl_bufsize = min_t(__u32,
+                                           imp->imp_connect_data.ocd_max_easize,
+                                           XATTR_SIZE_MAX);
                        mdc_reset_acl_req(req);
                        goto again;
                }
@@ -1136,7 +1136,7 @@ static struct page *mdc_page_locate(struct address_space *mapping, __u64 *hash,
        xa_lock_irqsave(&mapping->i_pages, flags);
        found = radix_tree_gang_lookup(&mapping->page_tree,
                                       (void **)&page, offset, 1);
-       if (found > 0 && !radix_tree_exceptional_entry(page)) {
+       if (found > 0 && !xa_is_value(page)) {
                struct lu_dirpage *dp;
 
                get_page(page);
@@ -2896,7 +2896,7 @@ static int mdc_cleanup(struct obd_device *obd)
        return osc_cleanup_common(obd);
 }
 
-static struct obd_ops mdc_obd_ops = {
+static const struct obd_ops mdc_obd_ops = {
        .o_owner            = THIS_MODULE,
        .o_setup            = mdc_setup,
        .o_precleanup       = mdc_precleanup,
@@ -2919,7 +2919,7 @@ static struct obd_ops mdc_obd_ops = {
        .o_quotactl         = mdc_quotactl,
 };
 
-static struct md_ops mdc_md_ops = {
+static const struct md_ops mdc_md_ops = {
        .m_get_root         = mdc_get_root,
        .m_null_inode       = mdc_null_inode,
        .m_close            = mdc_close,