--- util-vserver-0.30.208/kernel/cvirt_def.h 2005-05-12 19:03:30.000000000 +0200 +++ util-vserver-0.30.208.x/kernel/cvirt_def.h 2005-08-02 09:23:07.000000000 +0200 @@ -23,10 +23,10 @@ struct _vx_syslog { wait_queue_head_t log_wait; spinlock_t logbuf_lock; /* lock for the log buffer */ - unsigned long log_start; /* next char to be read by syslog() */ - unsigned long con_start; /* next char to be sent to consoles */ - unsigned long log_end; /* most-recently-written-char + 1 */ - unsigned long logged_chars; /* #chars since last read+clear operation */ + unsigned long log_start; /* next char to be read by syslog() */ + unsigned long con_start; /* next char to be sent to consoles */ + unsigned long log_end; /* most-recently-written-char + 1 */ + unsigned long logged_chars; /* #chars since last read+clear operation */ char log_buf[1024]; }; --- util-vserver-0.30.208/kernel/debug.h 2005-07-03 15:59:47.000000000 +0200 +++ util-vserver-0.30.208.x/kernel/debug.h 2005-08-02 09:23:07.000000000 +0200 @@ -135,10 +135,10 @@ struct _vx_hist_entry { struct _vx_hist_entry *vxh_advance(void *loc); -#define VXH_HERE() \ - ({ __label__ here; \ - here:; \ - &&here; }) +#define VXH_HERE(__type) \ + ({ __label__ __vxh_##__type; \ + __vxh_##__type:; \ + &&__vxh_##__type; }) @@ -157,7 +157,7 @@ static inline void __vxh_copy_vxi(struct struct _vx_hist_entry *entry; \ \ preempt_disable(); \ - entry = vxh_advance(VXH_HERE()); \ + entry = vxh_advance(VXH_HERE(__type)); \ __data; \ entry->type = __type; \ preempt_enable(); @@ -179,7 +179,7 @@ static inline void __name(struct vx_info entry->sc.data = data #define VXH_DATA(__name, __type) \ -static inline \ +static inline \ void __name(struct vx_info *vxi, void *data) \ { \ __VXH_BODY(__type, __VXH_DATA) \ @@ -191,7 +191,7 @@ void __name(struct vx_info *vxi, void *d entry->ll.arg = arg #define VXH_LARG(__name, __type) \ -static inline \ +static inline \ void __name(struct vx_info *vxi, long arg) \ { \ __VXH_BODY(__type, __VXH_LARG) \ @@ -261,8 +261,11 @@ extern void vxh_dump_history(void); #ifdef CONFIG_VSERVER_DEBUG #define vxd_assert_lock(l) assert_spin_locked(l) +#define vxd_assert(c,f,x...) vxlprintk(!(c), \ + "assertion [" f "] failed.", ##x, __FILE__, __LINE__) #else #define vxd_assert_lock(l) do { } while (0) +#define vxd_assert(c,f,x...) do { } while (0) #endif --- util-vserver-0.30.208/kernel/limit.h 2005-05-12 19:03:30.000000000 +0200 +++ util-vserver-0.30.208.x/kernel/limit.h 2005-08-02 09:23:07.000000000 +0200 @@ -1,6 +1,12 @@ #ifndef _VX_LIMIT_H #define _VX_LIMIT_H + +#define VLIMIT_NSOCK 16 +#define VLIMIT_OPENFD 17 +#define VLIMIT_ANON 18 +#define VLIMIT_SHMEM 19 + #ifdef __KERNEL__ struct sysinfo; @@ -12,11 +18,6 @@ void vx_vsi_swapinfo(struct sysinfo *); #define NUM_LIMITS 24 -#define VLIMIT_NSOCK 16 -#define VLIMIT_OPENFD 17 -#define VLIMIT_ANON 18 -#define VLIMIT_SHMEM 19 - extern const char *vlimit_name[NUM_LIMITS]; #endif /* __KERNEL__ */ --- util-vserver-0.30.208/kernel/xid.h 2005-07-14 17:22:13.000000000 +0200 +++ util-vserver-0.30.208.x/kernel/xid.h 2005-08-02 09:12:01.000000000 +0200 @@ -5,11 +5,7 @@ #warning config options missing #endif -#define XID_TAG_SB(sb) (sb->s_flags & MS_TAGXID) - -#define XID_TAG(in) (!(in) || \ - (((struct inode *)in)->i_sb && \ - XID_TAG_SB(((struct inode *)in)->i_sb))) +#define XID_TAG(in) (IS_TAGXID(in)) #ifdef CONFIG_XID_TAG_NFSD @@ -105,11 +101,17 @@ #endif -#ifdef CONFIG_INOXID_NONE +#ifndef CONFIG_INOXID_NONE +#define vx_current_fsxid(sb) \ + ((sb)->s_flags & MS_TAGXID ? current->xid : 0) +#else #define vx_current_fsxid(sb) (0) +#endif + +#ifndef CONFIG_INOXID_INTERN +#define XIDINO_XID(tag, xid) (0) #else -#define vx_current_fsxid(sb) \ - (XID_TAG_SB(sb) ? current->xid : 0) +#define XIDINO_XID(tag, xid) ((tag) ? (xid) : 0) #endif #define INOXID_UID(tag, uid, gid) \