Whamcloud - gitweb
LU-8468 kernel: kernel update RHEL7.2 [3.10.0-327.28.2.el7]
[fs/lustre-release.git] / lustre / fld / fld_cache.c
index bb42482..8e4a691 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 
 #define DEBUG_SUBSYSTEM S_FLD
 
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/module.h>
-# include <linux/math64.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-# include <libcfs/list.h>
-#endif
-
+#include <libcfs/libcfs.h>
+#include <linux/module.h>
+#include <linux/math64.h>
 #include <obd_support.h>
 #include <lustre_fld.h>
 #include "fld_internal.h"
@@ -148,12 +142,12 @@ static void fld_fix_new_list(struct fld_cache *cache)
 restart_fixup:
 
        list_for_each_entry_safe(f_curr, f_next, head, fce_list) {
-                c_range = &f_curr->fce_range;
-                n_range = &f_next->fce_range;
+               c_range = &f_curr->fce_range;
+               n_range = &f_next->fce_range;
 
-                LASSERT(range_is_sane(c_range));
-                if (&f_next->fce_list == head)
-                        break;
+               LASSERT(lu_seq_range_is_sane(c_range));
+               if (&f_next->fce_list == head)
+                       break;
 
                if (c_range->lsr_flags != n_range->lsr_flags)
                        continue;
@@ -375,7 +369,7 @@ struct fld_cache_entry
 {
        struct fld_cache_entry *f_new;
 
-       LASSERT(range_is_sane(range));
+       LASSERT(lu_seq_range_is_sane(range));
 
        OBD_ALLOC_PTR(f_new);
        if (!f_new)
@@ -551,10 +545,10 @@ int fld_cache_lookup(struct fld_cache *cache,
                }
 
                prev = flde;
-                if (range_within(&flde->fce_range, seq)) {
-                        *range = flde->fce_range;
+               if (lu_seq_range_within(&flde->fce_range, seq)) {
+                       *range = flde->fce_range;
 
-                        cache->fci_stat.fst_cache++;
+                       cache->fci_stat.fst_cache++;
                        read_unlock(&cache->fci_lock);
                        RETURN(0);
                }