Arla on Linux 2.6.24

Bo Brantén <[email protected]>
Newsgroups gmane.comp.file-systems.arla.general
Message-ID <[email protected]>
Hello,

I tryed the current CVS version of Arla on Linux 2.6.24 (Ubuntu 8.04 LTS) 
and the diff below shows what I needed to change in the kernel module, 
after that everything works fine! Is this the patch format you prefere?

bo@ANJA:~/src/arla/nnpfs/linux$ diff -c nnpfs_vfsops.bak 
nnpfs_vfsops.c
*** nnpfs_vfsops.bak	2006-12-11 17:43:35.000000000 +0100
--- nnpfs_vfsops.c	2008-09-30 00:03:54.000000000 +0200
***************
*** 352,358 ****
--- 352,366 ----
       tmp.f_bavail  = 1024*1024*2-50;
       tmp.f_files   = 1024*1024;
       tmp.f_ffree   = 1024*1024-100;
+     tmp.f_fsid.val[0] = 0;
+     tmp.f_fsid.val[1] = 0;
       tmp.f_namelen = NAME_MAX;
+     tmp.f_frsize  = 0;
+     tmp.f_spare[0] = 0;
+     tmp.f_spare[1] = 0;
+     tmp.f_spare[2] = 0;
+     tmp.f_spare[3] = 0;
+     tmp.f_spare[4] = 0;
       *buf = tmp;
       return 0;
   }
bo@ANJA:~/src/arla/nnpfs/linux$ diff -c nnpfs_syscalls-lossage.bak 
nnpfs_syscalls-lossage.c
*** nnpfs_syscalls-lossage.bak	2006-12-11 17:31:45.000000000 +0100
--- nnpfs_syscalls-lossage.c	2008-09-30 00:34:55.000000000 +0200
***************
*** 63,68 ****
--- 63,69 ----
   		    unsigned long *offset,
   		    char **modname, char *namebuf);

+ extern rwlock_t tasklist_lock __attribute__((weak));
   static void **
   get_start_addr(void) {
   #ifdef __x86_64__
bo@ANJA:~/src/arla/nnpfs/linux$ diff -c nnpfs_syscalls.bak 
nnpfs_syscalls.c
*** nnpfs_syscalls.bak	2007-01-03 15:26:27.000000000 +0100
--- nnpfs_syscalls.c	2008-09-30 00:33:14.000000000 +0200
***************
*** 147,152 ****
--- 147,154 ----
   #define SEC2PAG(s) (nnpfs_pag_t)(unsigned long)(s)
   #define PAG2SEC(p) (void *)(unsigned long)(p)

+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+
   static int
   nnpfs_sec_task_alloc(struct task_struct *p)
   {
***************
*** 164,169 ****
--- 166,173 ----
   	p->security = NULL;
   }

+ #endif
+
   static nnpfs_pag_t
   nnpfs_get_pag_sec(void)
   {
***************
*** 188,198 ****
--- 192,204 ----
       return 0;
   }

+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
   static struct security_operations nnpfs_sec_ops = {
       .task_alloc_security = nnpfs_sec_task_alloc,
       .task_free_security = nnpfs_sec_task_free,
   //    .task_reparent_to_init = nnpfs_sec_reparent_to_init,
   };
+ #endif

   #endif /* CONFIG_SECURITY */

***************
*** 840,851 ****
--- 846,859 ----
   install_afs_syscall(void)
   {
   #ifdef CONFIG_SECURITY
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
       if (register_security(&nnpfs_sec_ops))
   	NNPFSDEB(XDEBSYS,
   		 ("install_afs_syscall: nnpfs_init_sec failed\n"));
       else
   	nnpfs_sec_registered = 1;
   #endif
+ #endif

       nnpfs_init_procfs();

***************
*** 888,896 ****
--- 896,906 ----
   #endif /* SYSCALLHACK */

   #ifdef CONFIG_SECURITY
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
       if (nnpfs_sec_registered)
   	if (unregister_security(&nnpfs_sec_ops))
   	    printk(KERN_EMERG "nnpfs_exit_sec: couldn't unregister\n");
+ #endif
   #endif /* !CONFIG_SECURITY */

   #ifdef GROUPPAGS
bo@ANJA:~/src/arla/nnpfs/linux$
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.