From 75a835eb9fbca33a649d913fa7dac06872253ef8 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 16 Oct 2003 17:56:09 +0000 Subject: [PATCH] - minor changes to run luster on 2.6 --- lustre/include/linux/lustre_compat25.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 01cdf57..eee421b 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -33,6 +33,13 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) +/* + * OBD need working random driver, thus all our + * initialization routines must be called after device + * driver initialization + */ +#define module_init(a) late_initcall(a) + /* XXX our code should be using the 2.6 calls, not the other way around */ #define TryLockPage(page) TestSetPageLocked(page) #define filemap_fdatasync(mapping) filemap_fdatawrite(mapping) @@ -58,6 +65,14 @@ #include +static inline void lustre_daemonize_helper(void) +{ + LASSERT(current->signal != NULL); + current->signal->session = 1; + current->signal->pgrp = 1; + current->signal->tty = NULL; +} + #else /* 2.4.. */ #define ll_vfs_create(a,b,c,d) vfs_create(a,b,c) @@ -111,6 +126,13 @@ static inline void __d_drop(struct dentry *dentry) INIT_LIST_HEAD(&dentry->d_hash); } +static inline void lustre_daemonize_helper(void) +{ + current->session = 1; + current->pgrp = 1; + current->tty = NULL; +} + #endif /* end of 2.4 compat macros */ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -- 1.8.3.1