Whamcloud - gitweb
LU-3834 mdt: handle swap_layouts failures during restore
[fs/lustre-release.git] / lustre / quota / lquota_entry.c
index 7ccdd17..16f703d 100644 (file)
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2011, 2012, Intel, Inc.
+ * Copyright (c) 2012, Intel Corporation.
  * Use is subject to license terms.
  *
- * Author: Johann Lombardi <johann@whamcloud.com>
- * Author: Niu    Yawei    <niu@whamcloud.com>
+ * Author: Johann Lombardi <johann.lombardi@intel.com>
+ * Author: Niu    Yawei    <yawei.niu@intel.com>
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
 #define DEBUG_SUBSYSTEM S_LQUOTA
 
 #include <linux/module.h>
@@ -41,7 +37,6 @@
 static int hash_lqs_cur_bits = HASH_LQE_CUR_BITS;
 CFS_MODULE_PARM(hash_lqs_cur_bits, "i", int, 0444,
                 "the current bits of lqe hash");
-cfs_mem_cache_t *lqe_kmem;
 
 static unsigned lqe64_hash_hash(cfs_hash_t *hs, const void *key, unsigned mask)
 {
@@ -177,7 +172,7 @@ retry:
                        "freed:%lu, repeat:%u\n", hash,
                        d.lid_inuse, d.lid_freed, repeat);
                repeat++;
-               cfs_schedule_timeout_and_set_state(CFS_TASK_INTERRUPTIBLE,
+               schedule_timeout_and_set_state(TASK_INTERRUPTIBLE,
                                                cfs_time_seconds(1));
                goto retry;
        }
@@ -327,7 +322,7 @@ struct lquota_entry *lqe_locate(const struct lu_env *env,
                RETURN(lqe);
        }
 
-       OBD_SLAB_ALLOC_PTR_GFP(new, lqe_kmem, CFS_ALLOC_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(new, lqe_kmem, __GFP_IO);
        if (new == NULL) {
                CERROR("Fail to allocate lqe for id:"LPU64", "
                        "hash:%s\n", qid->qid_uid, site->lqs_hash->hs_name);