#define ll_set_fs_pwd set_fs_pwd
#endif /* HAVE_SET_FS_PWD */
-#define ATTR_BLOCKS 0x4000
+/*
+ * set ATTR_BLOCKS to a high value to avoid any risk of collision with other
+ * ATTR_* attributes (see bug 13828)
+ */
+#define ATTR_BLOCKS (1 << 27)
#if HAVE_INODE_I_MUTEX
#define UNLOCK_INODE_MUTEX(inode) do {mutex_unlock(&(inode)->i_mutex); } while(0)
#define gfp_t int
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-
#define lock_dentry(___dentry) spin_lock(&(___dentry)->d_lock)
#define unlock_dentry(___dentry) spin_unlock(&(___dentry)->d_lock)
#include <linux/proc_fs.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+#ifndef HAVE___D_REHASH
#define __d_rehash(dentry, lock) d_rehash_cond(dentry, lock)
#endif
#define CheckWriteback(page, cmd) \
(!(!PageWriteback(page) && cmd == OBD_BRW_WRITE))
-#endif
-
#ifdef HAVE_PAGE_LIST
static inline int mapping_has_pages(struct address_space *mapping)
{