Whamcloud - gitweb
LU-1214 quota: don't compile quota module for client
[fs/lustre-release.git] / lustre / quota / quota_interface.c
index ea6d8ec..c82e280 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,8 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011 Whamcloud, Inc.
- *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -68,8 +65,6 @@
 
 #ifdef __KERNEL__
 
-#ifdef HAVE_QUOTA_SUPPORT
-
 static cfs_time_t last_print = 0;
 static cfs_spinlock_t last_print_lock = CFS_SPIN_LOCK_UNLOCKED;
 
@@ -730,11 +725,6 @@ static int quota_acquire_common(struct obd_device *obd, const unsigned int id[],
         RETURN(rc);
 }
 
-#endif /* HAVE_QUOTA_SUPPORT */
-#endif /* __KERNEL__ */
-
-#ifdef __KERNEL__
-#ifdef HAVE_QUOTA_SUPPORT
 quota_interface_t mds_quota_interface = {
         .quota_init     = mds_quota_init,
         .quota_exit     = mds_quota_exit,
@@ -766,16 +756,11 @@ quota_interface_t filter_quota_interface = {
         .quota_adjust_qunit   = filter_quota_adjust_qunit,
         .quota_pending_commit = quota_pending_commit,
 };
-#endif
-#endif /* __KERNEL__ */
-
-#ifdef __KERNEL__
 
 cfs_proc_dir_entry_t *lquota_type_proc_dir = NULL;
 
 static int __init init_lustre_quota(void)
 {
-#ifdef HAVE_QUOTA_SUPPORT
         int rc = 0;
 
         lquota_type_proc_dir = lprocfs_register(OBD_LQUOTA_DEVICENAME,
@@ -793,13 +778,12 @@ static int __init init_lustre_quota(void)
 
         PORTAL_SYMBOL_REGISTER(filter_quota_interface);
         PORTAL_SYMBOL_REGISTER(mds_quota_interface);
-#endif
+
         return 0;
 }
 
 static void /*__exit*/ exit_lustre_quota(void)
 {
-#ifdef HAVE_QUOTA_SUPPORT
         PORTAL_SYMBOL_UNREGISTER(filter_quota_interface);
         PORTAL_SYMBOL_UNREGISTER(mds_quota_interface);
 
@@ -807,7 +791,6 @@ static void /*__exit*/ exit_lustre_quota(void)
 
         if (lquota_type_proc_dir)
                 lprocfs_remove(&lquota_type_proc_dir);
-#endif
 }
 
 MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
@@ -816,8 +799,6 @@ MODULE_LICENSE("GPL");
 
 cfs_module(lquota, "1.0.0", init_lustre_quota, exit_lustre_quota);
 
-#ifdef HAVE_QUOTA_SUPPORT
 EXPORT_SYMBOL(mds_quota_interface);
 EXPORT_SYMBOL(filter_quota_interface);
-#endif
 #endif /* __KERNEL */