Whamcloud - gitweb
LU-13163 mdc: new kernel function xa_is_value()
[fs/lustre-release.git] / lustre / mdc / mdc_request.c
index a46b44b..b1ccedf 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>
 
@@ -1136,7 +1134,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 +2894,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 +2917,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,