Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 357366 Details for
Bug 482962
~net-fs/openafs-kernel-1.6.2 fails to build against 3.9 and 3.10 kernels
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix 1.6.2 against newer kernels
patch (text/plain), 9.96 KB, created by
Ian Stakenvicius (RETIRED)
on 2013-08-29 19:55:46 UTC
(
hide
)
Description:
fix 1.6.2 against newer kernels
Filename:
MIME Type:
Creator:
Ian Stakenvicius (RETIRED)
Created:
2013-08-29 19:55:46 UTC
Size:
9.96 KB
patch
obsolete
>Index: openafs-kernel-1.6.2-r1.ebuild >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/openafs-kernel-1.6.2-r1.ebuild,v >retrieving revision 1.1 >diff -u -B -r1.1 openafs-kernel-1.6.2-r1.ebuild >--- openafs-kernel-1.6.2-r1.ebuild 29 Aug 2013 18:44:48 -0000 1.1 >+++ openafs-kernel-1.6.2-r1.ebuild 29 Aug 2013 19:49:07 -0000 >@@ -43,6 +43,8 @@ > EPATCH_SUFFIX="patch" \ > epatch "${WORKDIR}"/gentoo/patches > epatch "${FILESDIR}"/openafs-1.6.2-kernel-3.8-{1..5}.patch >+ epatch "${FILESDIR}"/openafs-1.6.2-kernel-3.9-1.patch >+ epatch "${FILESDIR}"/openafs-1.6.2-kernel-3.10-{1..2}.patch > > # packaging is f-ed up, so we can't run eautoreconf > # run autotools commands based on what is listed in regen.sh >--- /dev/null 2013-08-25 06:46:08.362358344 -0400 >+++ files/openafs-1.6.2-kernel-3.9-1.patch 2013-08-29 15:39:39.000000000 -0400 >@@ -0,0 +1,82 @@ >+From: Marc Dionne <marc.c.dionne@gmail.com> >+Date: Wed, 6 Mar 2013 01:54:50 +0000 (-0500) >+Subject: Linux 3.9: hlist iterator change >+X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d585eb30baf767d50e93ee52db88d73afb76e9cb >+ >+Linux 3.9: hlist iterator change >+ >+hlist iterators have been reworked to not require a temporary >+node parameter. >+ >+Reviewed-on: http://gerrit.openafs.org/9403 >+Tested-by: BuildBot <buildbot@rampaginggeek.com> >+Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> >+Reviewed-by: Derrick Brashear <shadow@your-file-system.com> >+(cherry picked from commit 9cfd7f768ca350d3b750e89e7ddb186bdad6f726) >+ >+Change-Id: I47df8894467f4bb1c60cf239ec0ce0a4d6ca29aa >+--- >+ >+diff --git a/acinclude.m4 b/acinclude.m4 >+index 4223bb1..6f5bc8d 100644 >+--- a/acinclude.m4 >++++ b/acinclude.m4 >+@@ -991,6 +991,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) >+ LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE >+ LINUX_DENTRY_OPEN_TAKES_PATH >+ LINUX_D_ALIAS_IS_HLIST >++ LINUX_HLIST_ITERATOR_NO_NODE >+ LINUX_IOP_I_CREATE_TAKES_BOOL >+ LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED >+ LINUX_IOP_LOOKUP_TAKES_UNSIGNED >+diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c >+index 1366b96..8e7dfe2 100644 >+--- a/src/afs/LINUX/osi_vnodeops.c >++++ b/src/afs/LINUX/osi_vnodeops.c >+@@ -701,7 +701,7 @@ canonical_dentry(struct inode *ip) >+ { >+ struct vcache *vcp = VTOAFS(ip); >+ struct dentry *first = NULL, *ret = NULL, *cur; >+-#if defined(D_ALIAS_IS_HLIST) >++#if defined(D_ALIAS_IS_HLIST) && !defined(HLIST_ITERATOR_NO_NODE) >+ struct hlist_node *p; >+ #endif >+ >+@@ -724,7 +724,11 @@ canonical_dentry(struct inode *ip) >+ # endif >+ >+ #if defined(D_ALIAS_IS_HLIST) >++# if defined(HLIST_ITERATOR_NO_NODE) >++ hlist_for_each_entry(cur, &ip->i_dentry, d_alias) { >++# else >+ hlist_for_each_entry(cur, p, &ip->i_dentry, d_alias) { >++# endif >+ #else >+ list_for_each_entry_reverse(cur, &ip->i_dentry, d_alias) { >+ #endif >+diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 >+index fc0149f..7c0a181 100644 >+--- a/src/cf/linux-test4.m4 >++++ b/src/cf/linux-test4.m4 >+@@ -714,6 +714,21 @@ AC_DEFUN([LINUX_D_ALIAS_IS_HLIST], [ >+ ]) >+ >+ >++AC_DEFUN([LINUX_HLIST_ITERATOR_NO_NODE], [ >++ AC_CHECK_LINUX_BUILD([whether hlist iterators don't need a node parameter], >++ [ac_cv_linux_hlist_takes_no_node], >++ [#include <linux/list.h> >++ #include <linux/fs.h>], >++ [struct dentry *d = NULL, *cur; >++ struct inode *ip; >++ hlist_for_each_entry(cur, &ip->i_dentry, d_alias) { } >++ ], >++ [HLIST_ITERATOR_NO_NODE], >++ [define if hlist iterators don't need a node parameter], >++ []) >++]) >++ >++ >+ AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_BOOL], [ >+ AC_CHECK_LINUX_BUILD([whether inode_operations.create takes a bool], >+ [ac_cv_linux_func_i_create_takes_bool], >--- /dev/null 2013-08-25 06:46:08.362358344 -0400 >+++ files/openafs-1.6.2-kernel-3.10-1.patch 2013-08-29 15:03:21.000000000 -0400 >@@ -0,0 +1,35 @@ >+From: Marc Dionne <marc.dionne@your-file-system.com> >+Date: Wed, 15 May 2013 19:19:22 +0000 (-0400) >+Subject: Linux 3.10: Include linux/aio.h directly >+X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=24468d9c942480f872d01c9bbc9710e2035c09c9 >+ >+Linux 3.10: Include linux/aio.h directly >+ >+This file needs bits from linux/aio.h, but gets them indirectly >+from the inclusion of aio.h by sched.h. That gets removed for >+Linux 3.10. >+ >+Since this header is not of general interest elsewhere, just include >+it directly here. >+ >+Reviewed-on: http://gerrit.openafs.org/9912 >+Reviewed-by: Derrick Brashear <shadow@your-file-system.com> >+Reviewed-by: Andrew Deason <adeason@sinenomine.net> >+Tested-by: BuildBot <buildbot@rampaginggeek.com> >+(cherry picked from commit fca4252621b80c5126e1ae3d84a54da5ebc677ba) >+ >+Change-Id: I7da471ee033087592b9ec3f10331baf0135cc201 >+--- >+ >+diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c >+index f8db123..fa0ad91 100644 >+--- a/src/afs/LINUX/osi_vnodeops.c >++++ b/src/afs/LINUX/osi_vnodeops.c >+@@ -32,6 +32,7 @@ >+ #include <linux/pagemap.h> >+ #include <linux/writeback.h> >+ #include <linux/pagevec.h> >++#include <linux/aio.h> >+ #include "afs/lock.h" >+ #include "afs/afs_bypasscache.h" >+ >--- /dev/null 2013-08-25 06:46:08.362358344 -0400 >+++ files/openafs-1.6.2-kernel-3.10-2.patch 2013-08-29 14:57:26.000000000 -0400 >@@ -0,0 +1,146 @@ >+From: Marc Dionne <marc.dionne@your-file-system.com> >+Date: Tue, 7 May 2013 00:20:07 +0000 (-0400) >+Subject: Linux 3.10: Replace create_proc_entry() with proc_create() >+X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d93aa9bdf702ac11eaf9b5121daaa5f9587d2b5e >+ >+Linux 3.10: Replace create_proc_entry() with proc_create() >+ >+Add an afs_proc_create() compat function that uses the >+appropriate kernel function based on a configure test. >+ >+Reviewed-on: http://gerrit.openafs.org/9854 >+Tested-by: BuildBot <buildbot@rampaginggeek.com> >+Reviewed-by: Andrew Deason <adeason@sinenomine.net> >+Reviewed-by: Derrick Brashear <shadow@your-file-system.com> >+(cherry picked from commit 9b24013426e03a501fcaa6334ba5a9b48a8da3d1) >+ >+Change-Id: I976ef345b1638434026e852e577e1f4474171e3d >+--- >+ >+diff --git a/acinclude.m4 b/acinclude.m4 >+index 8334d08..b548b92 100644 >+--- a/acinclude.m4 >++++ b/acinclude.m4 >+@@ -920,6 +920,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) >+ [#include <linux/fs.h> >+ #include <linux/namei.h>], >+ [path_lookup(NULL, 0, NULL);]) >++ AC_CHECK_LINUX_FUNC([proc_create], >++ [#include <linux/proc_fs.h>], >++ [proc_create(NULL, 0, NULL, NULL);]) >+ AC_CHECK_LINUX_FUNC([rcu_read_lock], >+ [#include <linux/rcupdate.h>], >+ [rcu_read_lock();]) >+diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h >+index d726c6a..b933560 100644 >+--- a/src/afs/LINUX/osi_compat.h >++++ b/src/afs/LINUX/osi_compat.h >+@@ -552,4 +552,17 @@ afs_truncate(struct inode *inode, int len) >+ return code; >+ } >+ >++static inline struct proc_dir_entry * >++afs_proc_create(char *name, umode_t mode, struct proc_dir_entry *parent, struct file_operations *fops) { >++#if defined(HAVE_LINUX_PROC_CREATE) >++ return proc_create(name, mode, parent, fops); >++#else >++ struct proc_dir_entry *entry; >++ entry = create_proc_entry(name, mode, parent); >++ if (entry) >++ entry->proc_fops = fops; >++ return entry; >++#endif >++} >++ >+ #endif /* AFS_LINUX_OSI_COMPAT_H */ >+diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c >+index 45e0fcd..82e907b 100644 >+--- a/src/afs/LINUX/osi_ioctl.c >++++ b/src/afs/LINUX/osi_ioctl.c >+@@ -29,12 +29,13 @@ >+ #include <linux/ioctl32.h> >+ #endif >+ >+-#include <linux/proc_fs.h> >+ #include <linux/slab.h> >+ #include <linux/init.h> >+ #include <linux/sched.h> >+ #include <linux/kernel.h> >+ >++#include "osi_compat.h" >++ >+ extern struct proc_dir_entry *openafs_procfs; >+ #if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL) >+ static int ioctl32_done; >+@@ -107,10 +108,10 @@ osi_ioctl_init(void) >+ { >+ struct proc_dir_entry *entry; >+ >+- entry = create_proc_entry(PROC_SYSCALL_NAME, 0666, openafs_procfs); >+- entry->proc_fops = &afs_syscall_fops; >++ entry = afs_proc_create(PROC_SYSCALL_NAME, 0666, openafs_procfs, &afs_syscall_fops); >+ #if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER) >+- entry->owner = THIS_MODULE; >++ if (entry) >++ entry->owner = THIS_MODULE; >+ #endif >+ >+ #if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL) >+diff --git a/src/afs/LINUX/osi_proc.c b/src/afs/LINUX/osi_proc.c >+index 974c0a7..5e3ac53 100644 >+--- a/src/afs/LINUX/osi_proc.c >++++ b/src/afs/LINUX/osi_proc.c >+@@ -29,12 +29,13 @@ >+ # include <asm/ia32_unistd.h> >+ #endif >+ >+-#include <linux/proc_fs.h> >+ #include <linux/slab.h> >+ #include <linux/init.h> >+ #include <linux/sched.h> >+ #include <linux/kernel.h> >+ >++#include "osi_compat.h" >++ >+ struct proc_dir_entry *openafs_procfs; >+ >+ #ifdef HAVE_LINUX_SEQ_FILE_H >+@@ -367,21 +368,18 @@ osi_proc_init(void) >+ openafs_procfs = proc_mkdir(path, NULL); >+ #endif >+ #ifdef HAVE_LINUX_SEQ_FILE_H >+- entry = create_proc_entry("unixusers", 0, openafs_procfs); >+- if (entry) { >+- entry->proc_fops = &afs_unixuser_fops; >++ entry = afs_proc_create("unixusers", 0, openafs_procfs, &afs_unixuser_fops); >+ # if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER) >++ if (entry) >+ entry->owner = THIS_MODULE; >+ # endif >+- } >+- entry = create_proc_entry(PROC_CELLSERVDB_NAME, 0, openafs_procfs); >+- if (entry) >+- entry->proc_fops = &afs_csdb_operations; >++ entry = afs_proc_create(PROC_CELLSERVDB_NAME, 0, openafs_procfs, &afs_csdb_operations); >+ #else >+ entry = create_proc_info_entry(PROC_CELLSERVDB_NAME, (S_IFREG|S_IRUGO), openafs_procfs, csdbproc_info); >+ #endif >+ #if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER) >+- entry->owner = THIS_MODULE; >++ if (entry) >++ entry->owner = THIS_MODULE; >+ #endif >+ } >+ >+diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h >+index f7abc2e..5840227 100644 >+--- a/src/afs/sysincludes.h >++++ b/src/afs/sysincludes.h >+@@ -160,6 +160,7 @@ struct xfs_inode_info { >+ # include <linux/sched.h> >+ # include <linux/mm.h> >+ # include <linux/slab.h> >++# include <linux/proc_fs.h> >+ # include <linux/string.h> >+ # if defined(HAVE_LINUX_SEMAPHORE_H) >+ # include <linux/semaphore.h>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 482962
: 357366