Whamcloud - gitweb
LU-823 compat: Don't use cfs_ functions on kernel structures
authorChristopher J. Morrone <morrone2@llnl.gov>
Fri, 4 Nov 2011 22:59:11 +0000 (15:59 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 12 Oct 2012 22:47:16 +0000 (18:47 -0400)
It is not really correct to use the generic "cfs_" prefixed
locking functions on the Linux kernel's data structures.  Revert
back to using the Linux locking function.

Change-Id: I64619c4b4f4963634b3d1e43c1b1519598e65e8d
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4176
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
lustre/include/linux/lustre_patchless_compat.h

index 9af47ef..061c5da 100644 (file)
@@ -61,7 +61,7 @@ static inline void ll_remove_from_page_cache(struct page *page)
 #ifdef HAVE_RW_TREE_LOCK
         write_lock_irq(&mapping->tree_lock);
 #else
-       cfs_spin_lock_irq(&mapping->tree_lock);
+       spin_lock_irq(&mapping->tree_lock);
 #endif
         radix_tree_delete(&mapping->page_tree, page->index);
         page->mapping = NULL;
@@ -71,7 +71,7 @@ static inline void ll_remove_from_page_cache(struct page *page)
 #ifdef HAVE_RW_TREE_LOCK
         write_unlock_irq(&mapping->tree_lock);
 #else
-       cfs_spin_unlock_irq(&mapping->tree_lock);
+       spin_unlock_irq(&mapping->tree_lock);
 #endif
 }
 #else /* HAVE_REMOVE_FROM_PAGE_CACHE */