From 3e339805cf9fdd67315947e35035193a4380d7b4 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 11 Jan 2004 23:44:54 +0000 Subject: [PATCH] - redo b_v26 branch --- lustre/include/liblustre.h | 4 ++++ lustre/lvfs/fsfilt_ext3.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index 872bc5b..6c6ac1d 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -716,8 +716,12 @@ typedef struct { volatile int counter; } atomic_t; #define atomic_add(b,a) do {(a)->counter += b;} while (0) #define atomic_sub(b,a) do {(a)->counter -= b;} while (0) +#ifndef likely #define likely(exp) (exp) +#endif +#ifndef unlikely #define unlikely(exp) (exp) +#endif /* log related */ static inline int llog_init_commit_master(void) { return 0; } diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index ec14d7c..606a11c 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -298,11 +298,14 @@ static int fsfilt_ext3_commit_async(struct inode *inode, void *h, unlock_kernel(); return rc; } - +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) rtid = log_start_commit(journal, transaction); if (rtid != tid) CERROR("strange race: %lu != %lu\n", (unsigned long) tid, (unsigned long) rtid); +#else + log_start_commit(journal, transaction->t_tid); +#endif unlock_kernel(); *wait_handle = (void *) tid; -- 1.8.3.1