X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Finclude%2Flibcfs%2Flinux%2Fportals_compat25.h;h=52b62441ecfbd2cda3a47333042dac2c97ea260e;hb=22c8262f0d7093bf120e100aaf42bd8782b9879a;hp=f9d9f84059fa37e8417db313ba4d81fb638c8394;hpb=98060d83459ba10409f295898f0ec917f938b4d3;p=fs%2Flustre-release.git diff --git a/libcfs/include/libcfs/linux/portals_compat25.h b/libcfs/include/libcfs/linux/portals_compat25.h index f9d9f84..52b6244 100644 --- a/libcfs/include/libcfs/linux/portals_compat25.h +++ b/libcfs/include/libcfs/linux/portals_compat25.h @@ -37,73 +37,13 @@ #ifndef __LIBCFS_LINUX_PORTALS_COMPAT_H__ #define __LIBCFS_LINUX_PORTALS_COMPAT_H__ -// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved -#if defined(SPINLOCK_DEBUG) && SPINLOCK_DEBUG -# define SIGNAL_MASK_ASSERT() \ - LASSERT(current->sighand->siglock.magic == SPINLOCK_MAGIC) -#else -# define SIGNAL_MASK_ASSERT() -#endif -// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved - -#define SIGNAL_MASK_LOCK(task, flags) \ - spin_lock_irqsave(&task->sighand->siglock, flags) -#define SIGNAL_MASK_UNLOCK(task, flags) \ - spin_unlock_irqrestore(&task->sighand->siglock, flags) -#define USERMODEHELPER(path, argv, envp) \ - call_usermodehelper(path, argv, envp, 1) -#define RECALC_SIGPENDING recalc_sigpending() -#define CLEAR_SIGPENDING clear_tsk_thread_flag(current, \ - TIF_SIGPENDING) -# define CURRENT_SECONDS get_seconds() -# define smp_num_cpus num_online_cpus() - -#define cfs_wait_event_interruptible(wq, condition, ret) \ - ret = wait_event_interruptible(wq, condition) -#define cfs_wait_event_interruptible_exclusive(wq, condition, ret) \ - ret = wait_event_interruptible_exclusive(wq, condition) - -#define THREAD_NAME(comm, len, fmt, a...) \ - snprintf(comm, len, fmt, ## a) - -/* 2.6 alloc_page users can use page->lru */ -#define PAGE_LIST_ENTRY lru -#define PAGE_LIST(page) ((page)->lru) - #ifndef __user #define __user #endif -#ifndef __fls -#define __cfs_fls fls -#else -#define __cfs_fls __fls -#endif - -#ifdef HAVE_5ARGS_SYSCTL_PROC_HANDLER -#define ll_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec(table, write, buffer, lenp, ppos); - -#define ll_proc_dolongvec(table, write, filp, buffer, lenp, ppos) \ - proc_doulongvec_minmax(table, write, buffer, lenp, ppos); -#define ll_proc_dostring(table, write, filp, buffer, lenp, ppos) \ - proc_dostring(table, write, buffer, lenp, ppos); -#define LL_PROC_PROTO(name) \ - name(cfs_sysctl_table_t *table, int write, \ - void __user *buffer, size_t *lenp, loff_t *ppos) -#else -#define ll_proc_dointvec(table, write, filp, buffer, lenp, ppos) \ - proc_dointvec(table, write, filp, buffer, lenp, ppos); - -#define ll_proc_dolongvec(table, write, filp, buffer, lenp, ppos) \ - proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); -#define ll_proc_dostring(table, write, filp, buffer, lenp, ppos) \ - proc_dostring(table, write, filp, buffer, lenp, ppos); -#define LL_PROC_PROTO(name) \ - name(cfs_sysctl_table_t *table, int write, struct file *filp, \ - void __user *buffer, size_t *lenp, loff_t *ppos) -#endif -#define DECLARE_LL_PROC_PPOS_DECL +#define LL_PROC_PROTO(name) \ + name(struct ctl_table *table, int write, \ + void __user *buffer, size_t *lenp, loff_t *ppos) /* helper for sysctl handlers */ int proc_call_handler(void *data, int write, @@ -111,4 +51,11 @@ int proc_call_handler(void *data, int write, int (*handler)(void *data, int write, loff_t pos, void *buffer, int len)); +#ifdef HAVE_INIT_NET +# define DEFAULT_NET (&init_net) +#else +/* some broken backports */ +# define DEFAULT_NET (NULL) +#endif + #endif /* _PORTALS_COMPAT_H */