Whamcloud - gitweb
LU-709 build: clean up LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
[fs/lustre-release.git] / lustre / include / linux / lustre_compat25.h
index 8af616e..d2939b5 100644 (file)
@@ -28,9 +28,8 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
- */
-/*
- * Copyright (c) 2011 Whamcloud, Inc.
+ *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -168,10 +167,6 @@ do {cfs_mutex_lock_nested(&(inode)->i_mutex, I_MUTEX_PARENT); } while(0)
 #define set_page_private(page, v) ((page)->private = (v))
 #endif
 
-#ifndef HAVE_GFP_T
-#define gfp_t int
-#endif
-
 #define lock_dentry(___dentry)          cfs_spin_lock(&(___dentry)->d_lock)
 #define unlock_dentry(___dentry)        cfs_spin_unlock(&(___dentry)->d_lock)
 
@@ -351,10 +346,6 @@ static inline int mapping_has_pages(struct address_space *mapping)
 #define DOWN_READ_I_ALLOC_SEM(i)  down_read(&(i)->i_alloc_sem)
 #define LASSERT_I_ALLOC_SEM_READ_LOCKED(i) LASSERT(down_write_trylock(&(i)->i_alloc_sem) == 0)
 
-#ifndef HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP
-#define grab_cache_page_nowait_gfp(x, y, z) grab_cache_page_nowait((x), (y))
-#endif
-
 #include <linux/mpage.h>        /* for generic_writepages */
 #ifndef HAVE_FILEMAP_FDATAWRITE_RANGE
 #include <linux/backing-dev.h>  /* for mapping->backing_dev_info */
@@ -684,13 +675,6 @@ static inline int ll_crypto_hmac(struct crypto_tfm *tfm,
 #define ll_crypto_tfm_alg_max_keysize  crypto_tfm_alg_max_keysize
 #endif /* HAVE_ASYNC_BLOCK_CIPHER */
 
-#ifndef HAVE_SYNCHRONIZE_RCU
-/* Linux 2.6.32 provides define when !CONFIG_TREE_PREEMPT_RCU */
-#ifndef synchronize_rcu
-#define synchronize_rcu() synchronize_kernel()
-#endif
-#endif
-
 #ifdef HAVE_FILE_REMOVE_SUID
 # define ll_remove_suid(file, mnt)       file_remove_suid(file)
 #else
@@ -771,6 +755,10 @@ static inline long labs(long x)
 #define INODE_PRIVATE_DATA(inode)       ((inode)->u.generic_ip)
 #endif
 
+#ifndef HAVE_SIMPLE_SETATTR
+#define simple_setattr(dentry, ops) inode_setattr((dentry)->d_inode, ops)
+#endif
+
 #ifndef SLAB_DESTROY_BY_RCU
 #define CFS_SLAB_DESTROY_BY_RCU 0
 #else
@@ -933,5 +921,11 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount)
 # define ext2_find_next_zero_bit  find_next_zero_bit_le
 #endif
 
+#ifdef ATTR_TIMES_SET
+# define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)
+#else
+# define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET)
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _COMPAT25_H */