Whamcloud - gitweb
LU-7727 mdt: fail FMODE_WRITE open if the client is read only
[fs/lustre-release.git] / lustre / obdclass / lu_ref.c
index 5d2fc06..3308b17 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -102,7 +102,6 @@ void lu_ref_print(const struct lu_ref *ref)
                 CERROR("     link: %s %p\n", link->ll_scope, link->ll_source);
         }
 }
-EXPORT_SYMBOL(lu_ref_print);
 
 static int lu_ref_is_marker(const struct lu_ref *ref)
 {
@@ -124,7 +123,6 @@ void lu_ref_print_all(void)
        }
        spin_unlock(&lu_ref_refs_guard);
 }
-EXPORT_SYMBOL(lu_ref_print_all);
 
 void lu_ref_init_loc(struct lu_ref *ref, const char *func, const int line)
 {
@@ -137,7 +135,6 @@ void lu_ref_init_loc(struct lu_ref *ref, const char *func, const int line)
        list_add(&ref->lf_linkage, &lu_ref_refs);
        spin_unlock(&lu_ref_refs_guard);
 }
-EXPORT_SYMBOL(lu_ref_init_loc);
 
 void lu_ref_fini(struct lu_ref *ref)
 {
@@ -147,7 +144,6 @@ void lu_ref_fini(struct lu_ref *ref)
        list_del_init(&ref->lf_linkage);
        spin_unlock(&lu_ref_refs_guard);
 }
-EXPORT_SYMBOL(lu_ref_fini);
 
 static struct lu_ref_link *lu_ref_add_context(struct lu_ref *ref,
                                               int flags,
@@ -185,7 +181,6 @@ void lu_ref_add(struct lu_ref *ref, const char *scope, const void *source)
        might_sleep();
        lu_ref_add_context(ref, GFP_IOFS, scope, source);
 }
-EXPORT_SYMBOL(lu_ref_add);
 
 void lu_ref_add_at(struct lu_ref *ref, struct lu_ref_link *link,
                   const char *scope, const void *source)
@@ -198,7 +193,6 @@ void lu_ref_add_at(struct lu_ref *ref, struct lu_ref_link *link,
        ref->lf_refs++;
        spin_unlock(&ref->lf_guard);
 }
-EXPORT_SYMBOL(lu_ref_add_at);
 
 /**
  * Version of lu_ref_add() to be used in non-blockable contexts.
@@ -208,7 +202,6 @@ void lu_ref_add_atomic(struct lu_ref *ref, const char *scope,
 {
        lu_ref_add_context(ref, GFP_ATOMIC, scope, source);
 }
-EXPORT_SYMBOL(lu_ref_add_atomic);
 
 static inline int lu_ref_link_eq(const struct lu_ref_link *link,
                                  const char *scope, const void *source)
@@ -262,7 +255,6 @@ void lu_ref_del(struct lu_ref *ref, const char *scope, const void *source)
                spin_unlock(&ref->lf_guard);
        }
 }
-EXPORT_SYMBOL(lu_ref_del);
 
 void lu_ref_set_at(struct lu_ref *ref, struct lu_ref_link *link,
                   const char *scope,
@@ -276,7 +268,6 @@ void lu_ref_set_at(struct lu_ref *ref, struct lu_ref_link *link,
        link->ll_source = source1;
        spin_unlock(&ref->lf_guard);
 }
-EXPORT_SYMBOL(lu_ref_set_at);
 
 void lu_ref_del_at(struct lu_ref *ref, struct lu_ref_link *link,
                   const char *scope, const void *source)
@@ -289,9 +280,8 @@ void lu_ref_del_at(struct lu_ref *ref, struct lu_ref_link *link,
        ref->lf_refs--;
        spin_unlock(&ref->lf_guard);
 }
-EXPORT_SYMBOL(lu_ref_del_at);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 static void *lu_ref_seq_start(struct seq_file *seq, loff_t *pos)
 {
@@ -415,7 +405,7 @@ static struct file_operations lu_ref_dump_fops = {
         .release = lu_ref_seq_release
 };
 
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
 int lu_ref_global_init(void)
 {
@@ -428,23 +418,23 @@ int lu_ref_global_init(void)
        spin_lock_init(&lu_ref_refs_guard);
         result = lu_kmem_init(lu_ref_caches);
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         if (result == 0) {
                 result = lprocfs_seq_create(proc_lustre_root, "lu_refs",
                                             0444, &lu_ref_dump_fops, NULL);
                 if (result)
                         lu_kmem_fini(lu_ref_caches);
         }
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
 
         return result;
 }
 
 void lu_ref_global_fini(void)
 {
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
         lprocfs_remove_proc_entry("lu_refs", proc_lustre_root);
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
         lu_kmem_fini(lu_ref_caches);
 }