/*
* 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/
#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)
#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 */
#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
#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
# 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 */