From: John L. <mov...@us...> - 2002-01-17 03:21:43
|
Update of /cvsroot/oprofile/oprofile/module In directory usw-pr-cvs1:/tmp/cvs-serv29438/module Modified Files: compat22.h compat24.h op_rtc.c op_syscalls.c oprofile.c Log Message: ->owner fixes Index: compat22.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/compat22.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- compat22.h 2002/01/17 02:33:05 1.1 +++ compat22.h 2002/01/17 03:21:40 1.2 @@ -30,7 +30,9 @@ #define release_mmap_sem(mm) up(&mm->mmap_sem) #define MODULE_LICENSE(l) -#define NEED_2_2_DENTRIES +#define INC_USE_COUNT_MAYBE MOD_INC_USE_COUNT +#define DEC_USE_COUNT_MAYBE MOD_DEC_USE_COUNT + extern int wind_dentries_2_2(struct dentry *dentry); extern uint do_path_hash_2_2(struct dentry *dentry); #define wind_dentries(d, v, r, m) wind_dentries_2_2(d) Index: compat24.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/compat24.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- compat24.h 2002/01/17 02:33:05 1.1 +++ compat24.h 2002/01/17 03:21:40 1.2 @@ -34,9 +34,12 @@ #define op_cpu_id() cpu_number_map(smp_processor_id()) #define pte_page_address(x) page_address(pte_page(x)) #define GET_VM_OFFSET(v) ((v)->vm_pgoff << PAGE_SHIFT) -#define HAVE_CROSS_MOUNT_POINT #define HAVE_MMAP2 #define PTRACE_OFF(t) ((t)->ptrace &= ~PT_DTRACE) + +/* ->owner field in 2.4 */ +#define INC_USE_COUNT_MAYBE +#define DEC_USE_COUNT_MAYBE /* 2.4.3 introduced rw mmap semaphore */ #if VAFTER(2,4,3) Index: op_rtc.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/op_rtc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- op_rtc.c 2002/01/15 20:26:17 1.6 +++ op_rtc.c 2002/01/17 03:21:40 1.7 @@ -28,8 +28,6 @@ #define RTC_IRQ 8 #endif -// FIXME: are we safe on 2.2 ? - /* ---------------- RTC handler ------------------ */ // FIXME: share Index: op_syscalls.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/op_syscalls.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- op_syscalls.c 2002/01/11 05:24:07 1.5 +++ op_syscalls.c 2002/01/17 03:21:40 1.6 @@ -354,7 +354,6 @@ } ret = do_execve(filename, (char **)regs.ecx, (char **)regs.edx, ®s); - // FIXME: check sys_execve if (!ret) { PTRACE_OFF(current); Index: oprofile.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/module/oprofile.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- oprofile.c 2002/01/14 07:02:03 1.33 +++ oprofile.c 2002/01/17 03:21:40 1.34 @@ -242,6 +242,7 @@ { if (test_and_set_bit(0, &oprof_note_opened)) return -EBUSY; + INC_USE_COUNT_MAYBE; return 0; } @@ -251,6 +252,7 @@ return -EFAULT; clear_bit(0, &oprof_note_opened); + DEC_USE_COUNT_MAYBE; return 0; } @@ -588,7 +590,6 @@ } static struct file_operations oprof_fops = { -// FIXME: no locking at all for 2.2 ? #ifdef HAVE_FILE_OPERATIONS_OWNER owner: THIS_MODULE, #endif |