From ca3a0133c681f0272bab5ca52ae82b9c51919a1b Mon Sep 17 00:00:00 2001 From: nic Date: Thu, 14 Oct 2004 20:01:59 +0000 Subject: [PATCH] r=adilger fixes to get b1_2 compiling with suse 2.6 kernel again --- lnet/include/linux/portals_compat25.h | 1 + lustre/include/linux/lustre_debug.h | 2 +- lustre/llite/namei.c | 4 ++-- lustre/portals/include/linux/portals_compat25.h | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lnet/include/linux/portals_compat25.h b/lnet/include/linux/portals_compat25.h index 7fe6dfc..3d0aff0 100644 --- a/lnet/include/linux/portals_compat25.h +++ b/lnet/include/linux/portals_compat25.h @@ -28,6 +28,7 @@ call_usermodehelper(path, argv, envp, 1) # define RECALC_SIGPENDING recalc_sigpending() # define CURRENT_SECONDS get_seconds() +# define smp_num_cpus NR_CPUS #elif defined(CONFIG_RH_2_4_20) /* RH 2.4.x */ diff --git a/lustre/include/linux/lustre_debug.h b/lustre/include/linux/lustre_debug.h index fc7349d..3a134b9 100644 --- a/lustre/include/linux/lustre_debug.h +++ b/lustre/include/linux/lustre_debug.h @@ -45,7 +45,7 @@ do { if (offset > ASSERT_MAX_SIZE_MB << 20) { \ #define LL_CDEBUG_PAGE(mask, page, fmt, arg...) \ CDEBUG(mask, "page %p map %p index %lu flags %lx count %u priv %0lx: " \ fmt, page, page->mapping, page->index, page->flags, \ - atomic_read(&page->count), page->private, ## arg) + page_count(page), page->private, ## arg) /* lib/debug.c */ int dump_lniobuf(struct niobuf_local *lnb); diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 09e499c..3286393 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -240,9 +240,9 @@ static void ll_d_add(struct dentry *de, struct inode *inode) /* d_rehash */ if (!d_unhashed(de)) { spin_unlock(&dcache_lock); - CERROR("dentry %.*s %p hash next %p, prev %p\n", + CERROR("dentry %.*s %p hash next %p\n", de->d_name.len, de->d_name.name, de, - de->d_hash.next, de->d_hash.prev); + de->d_hash.next); LBUG(); } __d_rehash(de, 0); diff --git a/lustre/portals/include/linux/portals_compat25.h b/lustre/portals/include/linux/portals_compat25.h index 7fe6dfc..3d0aff0 100644 --- a/lustre/portals/include/linux/portals_compat25.h +++ b/lustre/portals/include/linux/portals_compat25.h @@ -28,6 +28,7 @@ call_usermodehelper(path, argv, envp, 1) # define RECALC_SIGPENDING recalc_sigpending() # define CURRENT_SECONDS get_seconds() +# define smp_num_cpus NR_CPUS #elif defined(CONFIG_RH_2_4_20) /* RH 2.4.x */ -- 1.8.3.1