From 2ac1b0d70d6df23a7d48693fec1c876a030da792 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Wed, 20 Feb 2008 08:27:45 +0000 Subject: [PATCH] Branch HEAD b=14576 i=adilger i=green Fixed the build issues for HEAD patchless client with vanilla-2.6.22. --- lustre/autoconf/lustre-core.m4 | 2 ++ lustre/include/linux/lustre_compat25.h | 4 ++++ lustre/llite/llite_lib.c | 2 +- lustre/llite/remote_perm.c | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 820355f..9f5ee0e 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1325,8 +1325,10 @@ AC_DEFUN([LC_CONST_ACL_SIZE], tmp_flags="$CFLAGS" CFLAGS="$CFLAGS -I $LINUX/include $EXTRA_KCFLAGS" AC_TRY_RUN([ +#define __KERNEL__ #include #include +#undef __KERNEL__ // block include #define __LINUX_POSIX_ACL_H diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 110d54f..019d92d 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -378,5 +378,9 @@ int ll_unregister_blkdev(unsigned int dev, const char *name) #endif +#ifdef FS_ODD_RENAME +#define FS_RENAME_DOES_D_MOVE FS_ODD_RENAME +#endif + #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index eb45e5b..1c58f0e 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -894,7 +894,7 @@ int ll_fill_super(struct super_block *sb) cfs_module_get(); - sb->s_type->fs_flags |= FS_ODD_RENAME; + sb->s_type->fs_flags |= FS_RENAME_DOES_D_MOVE; /* client additional sb info */ lsi->lsi_llsbi = sbi = ll_init_sbi(); if (!sbi) { diff --git a/lustre/llite/remote_perm.c b/lustre/llite/remote_perm.c index 20cfa35..3e4ef7e 100644 --- a/lustre/llite/remote_perm.c +++ b/lustre/llite/remote_perm.c @@ -45,7 +45,7 @@ static inline struct ll_remote_perm *alloc_ll_remote_perm(void) { struct ll_remote_perm *lrp; - OBD_SLAB_ALLOC(lrp, ll_remote_perm_cachep, SLAB_KERNEL, sizeof(*lrp)); + OBD_SLAB_ALLOC(lrp, ll_remote_perm_cachep, GFP_KERNEL, sizeof(*lrp)); if (lrp) INIT_HLIST_NODE(&lrp->lrp_list); return lrp; @@ -66,7 +66,7 @@ struct hlist_head *alloc_rmtperm_hash(void) struct hlist_head *hash; int i; - OBD_SLAB_ALLOC(hash, ll_rmtperm_hash_cachep, SLAB_KERNEL, + OBD_SLAB_ALLOC(hash, ll_rmtperm_hash_cachep, GFP_KERNEL, REMOTE_PERM_HASHSIZE * sizeof(*hash)); if (!hash) -- 1.8.3.1