Whamcloud - gitweb
LU-334 llite: Add LPROC_LL_OSC_{READ,WRITE}.
[fs/lustre-release.git] / lustre / include / linux / lustre_patchless_compat.h
index ce53ac1..17fbc5c 100644 (file)
@@ -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.
  */
 /*
@@ -55,13 +55,13 @@ static inline void ll_remove_from_page_cache(struct page *page)
 #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
@@ -69,7 +69,7 @@ static inline void ll_remove_from_page_cache(struct page *page)
 #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
 }
 
@@ -87,7 +87,6 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
 #else
         clear_page_dirty(page);
 #endif
-        ClearPageUptodate(page);
         ClearPageMappedToDisk(page);
         ll_remove_from_page_cache(page);
         page_cache_release(page);       /* pagecache ref */