Whamcloud - gitweb
LU-4423 mdc: use 64-bit timestamps for mdc
[fs/lustre-release.git] / lustre / obdclass / lu_ref.c
index 4ebb29b..6edaf9f 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -27,7 +23,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -135,6 +131,7 @@ 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)
 {
@@ -146,6 +143,7 @@ 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,
@@ -181,8 +179,9 @@ static struct lu_ref_link *lu_ref_add_context(struct lu_ref *ref,
 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);
+       lu_ref_add_context(ref, GFP_NOFS, 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)
@@ -195,6 +194,7 @@ 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.
@@ -204,6 +204,7 @@ 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)
@@ -257,6 +258,7 @@ 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,
@@ -269,6 +271,7 @@ 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)
@@ -281,6 +284,7 @@ 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 CONFIG_PROC_FS