Whamcloud - gitweb
Mass conversion of all copyright messages to Oracle.
[fs/lustre-release.git] / lustre / include / linux / lustre_patchless_compat.h
index b315b44..39fe8f9 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * 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
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -52,24 +52,24 @@ static inline void ll_remove_from_page_cache(struct page *page)
 
         BUG_ON(!PageLocked(page));
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
+#ifdef HAVE_RW_TREE_LOCK
         write_lock_irq(&mapping->tree_lock);
 #else
-       spin_lock_irq(&mapping->tree_lock);
+       cfs_spin_lock_irq(&mapping->tree_lock);
 #endif
         radix_tree_delete(&mapping->page_tree, page->index);
         page->mapping = NULL;
         mapping->nrpages--;
 #ifdef HAVE_NR_PAGECACHE
-        atomic_add(-1, &nr_pagecache); // XXX pagecache_acct(-1);
+        cfs_atomic_add(-1, &nr_pagecache); // XXX pagecache_acct(-1);
 #else
         __dec_zone_page_state(page, NR_FILE_PAGES);
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
+#ifdef HAVE_RW_TREE_LOCK
         write_unlock_irq(&mapping->tree_lock);
 #else
-       spin_unlock_irq(&mapping->tree_lock);
+       cfs_spin_unlock_irq(&mapping->tree_lock);
 #endif
 }