Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 482962
Collapse All | Expand All

(-)openafs-kernel-1.6.2-r1.ebuild (+2 lines)
Lines 43-48 Link Here
43
	EPATCH_SUFFIX="patch" \
43
	EPATCH_SUFFIX="patch" \
44
	epatch "${WORKDIR}"/gentoo/patches
44
	epatch "${WORKDIR}"/gentoo/patches
45
	epatch "${FILESDIR}"/openafs-1.6.2-kernel-3.8-{1..5}.patch
45
	epatch "${FILESDIR}"/openafs-1.6.2-kernel-3.8-{1..5}.patch
46
	epatch "${FILESDIR}"/openafs-1.6.2-kernel-3.9-1.patch
47
	epatch "${FILESDIR}"/openafs-1.6.2-kernel-3.10-{1..2}.patch
46
48
47
	# packaging is f-ed up, so we can't run eautoreconf
49
	# packaging is f-ed up, so we can't run eautoreconf
48
	# run autotools commands based on what is listed in regen.sh
50
	# run autotools commands based on what is listed in regen.sh
(-) (+82 lines)
Added Link Here
1
From: Marc Dionne <marc.c.dionne@gmail.com>
2
Date: Wed, 6 Mar 2013 01:54:50 +0000 (-0500)
3
Subject: Linux 3.9: hlist iterator change
4
X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d585eb30baf767d50e93ee52db88d73afb76e9cb
5
6
Linux 3.9: hlist iterator change
7
8
hlist iterators have been reworked to not require a temporary
9
node parameter.
10
11
Reviewed-on: http://gerrit.openafs.org/9403
12
Tested-by: BuildBot <buildbot@rampaginggeek.com>
13
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
14
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
15
(cherry picked from commit 9cfd7f768ca350d3b750e89e7ddb186bdad6f726)
16
17
Change-Id: I47df8894467f4bb1c60cf239ec0ce0a4d6ca29aa
18
---
19
20
diff --git a/acinclude.m4 b/acinclude.m4
21
index 4223bb1..6f5bc8d 100644
22
--- a/acinclude.m4
23
+++ b/acinclude.m4
24
@@ -991,6 +991,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
25
 		 LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
26
 		 LINUX_DENTRY_OPEN_TAKES_PATH
27
 		 LINUX_D_ALIAS_IS_HLIST
28
+		 LINUX_HLIST_ITERATOR_NO_NODE
29
 		 LINUX_IOP_I_CREATE_TAKES_BOOL
30
 		 LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED
31
 		 LINUX_IOP_LOOKUP_TAKES_UNSIGNED
32
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
33
index 1366b96..8e7dfe2 100644
34
--- a/src/afs/LINUX/osi_vnodeops.c
35
+++ b/src/afs/LINUX/osi_vnodeops.c
36
@@ -701,7 +701,7 @@ canonical_dentry(struct inode *ip)
37
 {
38
     struct vcache *vcp = VTOAFS(ip);
39
     struct dentry *first = NULL, *ret = NULL, *cur;
40
-#if defined(D_ALIAS_IS_HLIST)
41
+#if defined(D_ALIAS_IS_HLIST) && !defined(HLIST_ITERATOR_NO_NODE)
42
     struct hlist_node *p;
43
 #endif
44
 
45
@@ -724,7 +724,11 @@ canonical_dentry(struct inode *ip)
46
 # endif
47
 
48
 #if defined(D_ALIAS_IS_HLIST)
49
+# if defined(HLIST_ITERATOR_NO_NODE)
50
+    hlist_for_each_entry(cur, &ip->i_dentry, d_alias) {
51
+# else
52
     hlist_for_each_entry(cur, p, &ip->i_dentry, d_alias) {
53
+# endif
54
 #else
55
     list_for_each_entry_reverse(cur, &ip->i_dentry, d_alias) {
56
 #endif
57
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
58
index fc0149f..7c0a181 100644
59
--- a/src/cf/linux-test4.m4
60
+++ b/src/cf/linux-test4.m4
61
@@ -714,6 +714,21 @@ AC_DEFUN([LINUX_D_ALIAS_IS_HLIST], [
62
 ])
63
 
64
 
65
+AC_DEFUN([LINUX_HLIST_ITERATOR_NO_NODE], [
66
+  AC_CHECK_LINUX_BUILD([whether hlist iterators don't need a node parameter],
67
+			[ac_cv_linux_hlist_takes_no_node],
68
+			[#include <linux/list.h>
69
+			#include <linux/fs.h>],
70
+			[struct dentry *d = NULL, *cur;
71
+			struct inode *ip;
72
+			hlist_for_each_entry(cur, &ip->i_dentry, d_alias) { }
73
+			],
74
+			[HLIST_ITERATOR_NO_NODE],
75
+			[define if hlist iterators don't need a node parameter],
76
+			[])
77
+])
78
+
79
+
80
 AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_BOOL], [
81
   AC_CHECK_LINUX_BUILD([whether inode_operations.create takes a bool],
82
 			[ac_cv_linux_func_i_create_takes_bool],
(-) (+35 lines)
Added Link Here
1
From: Marc Dionne <marc.dionne@your-file-system.com>
2
Date: Wed, 15 May 2013 19:19:22 +0000 (-0400)
3
Subject: Linux 3.10: Include linux/aio.h directly
4
X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=24468d9c942480f872d01c9bbc9710e2035c09c9
5
6
Linux 3.10: Include linux/aio.h directly
7
8
This file needs bits from linux/aio.h, but gets them indirectly
9
from the inclusion of aio.h by sched.h.  That gets removed for
10
Linux 3.10.
11
12
Since this header is not of general interest elsewhere, just include
13
it directly here.
14
15
Reviewed-on: http://gerrit.openafs.org/9912
16
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
17
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
18
Tested-by: BuildBot <buildbot@rampaginggeek.com>
19
(cherry picked from commit fca4252621b80c5126e1ae3d84a54da5ebc677ba)
20
21
Change-Id: I7da471ee033087592b9ec3f10331baf0135cc201
22
---
23
24
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
25
index f8db123..fa0ad91 100644
26
--- a/src/afs/LINUX/osi_vnodeops.c
27
+++ b/src/afs/LINUX/osi_vnodeops.c
28
@@ -32,6 +32,7 @@
29
 #include <linux/pagemap.h>
30
 #include <linux/writeback.h>
31
 #include <linux/pagevec.h>
32
+#include <linux/aio.h>
33
 #include "afs/lock.h"
34
 #include "afs/afs_bypasscache.h"
35
 
(-) (+146 lines)
Added Link Here
1
From: Marc Dionne <marc.dionne@your-file-system.com>
2
Date: Tue, 7 May 2013 00:20:07 +0000 (-0400)
3
Subject: Linux 3.10: Replace create_proc_entry() with proc_create()
4
X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d93aa9bdf702ac11eaf9b5121daaa5f9587d2b5e
5
6
Linux 3.10: Replace create_proc_entry() with proc_create()
7
8
Add an afs_proc_create() compat function that uses the
9
appropriate kernel function based on a configure test.
10
11
Reviewed-on: http://gerrit.openafs.org/9854
12
Tested-by: BuildBot <buildbot@rampaginggeek.com>
13
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
14
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
15
(cherry picked from commit 9b24013426e03a501fcaa6334ba5a9b48a8da3d1)
16
17
Change-Id: I976ef345b1638434026e852e577e1f4474171e3d
18
---
19
20
diff --git a/acinclude.m4 b/acinclude.m4
21
index 8334d08..b548b92 100644
22
--- a/acinclude.m4
23
+++ b/acinclude.m4
24
@@ -920,6 +920,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
25
 				     [#include <linux/fs.h>
26
 				      #include <linux/namei.h>],
27
 				     [path_lookup(NULL, 0, NULL);])
28
+		 AC_CHECK_LINUX_FUNC([proc_create],
29
+				     [#include <linux/proc_fs.h>],
30
+				     [proc_create(NULL, 0, NULL, NULL);])
31
 		 AC_CHECK_LINUX_FUNC([rcu_read_lock],
32
 				     [#include <linux/rcupdate.h>],
33
 				     [rcu_read_lock();])
34
diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
35
index d726c6a..b933560 100644
36
--- a/src/afs/LINUX/osi_compat.h
37
+++ b/src/afs/LINUX/osi_compat.h
38
@@ -552,4 +552,17 @@ afs_truncate(struct inode *inode, int len)
39
     return code;
40
 }
41
 
42
+static inline struct proc_dir_entry *
43
+afs_proc_create(char *name, umode_t mode, struct proc_dir_entry *parent, struct file_operations *fops) {
44
+#if defined(HAVE_LINUX_PROC_CREATE)
45
+    return proc_create(name, mode, parent, fops);
46
+#else
47
+    struct proc_dir_entry *entry;
48
+    entry = create_proc_entry(name, mode, parent);
49
+    if (entry)
50
+	entry->proc_fops = fops;
51
+    return entry;
52
+#endif
53
+}
54
+
55
 #endif /* AFS_LINUX_OSI_COMPAT_H */
56
diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c
57
index 45e0fcd..82e907b 100644
58
--- a/src/afs/LINUX/osi_ioctl.c
59
+++ b/src/afs/LINUX/osi_ioctl.c
60
@@ -29,12 +29,13 @@
61
 #include <linux/ioctl32.h>
62
 #endif
63
 
64
-#include <linux/proc_fs.h>
65
 #include <linux/slab.h>
66
 #include <linux/init.h>
67
 #include <linux/sched.h>
68
 #include <linux/kernel.h>
69
 
70
+#include "osi_compat.h"
71
+
72
 extern struct proc_dir_entry *openafs_procfs;
73
 #if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
74
 static int ioctl32_done;
75
@@ -107,10 +108,10 @@ osi_ioctl_init(void)
76
 {
77
     struct proc_dir_entry *entry;
78
 
79
-    entry = create_proc_entry(PROC_SYSCALL_NAME, 0666, openafs_procfs);
80
-    entry->proc_fops = &afs_syscall_fops;
81
+    entry = afs_proc_create(PROC_SYSCALL_NAME, 0666, openafs_procfs, &afs_syscall_fops);
82
 #if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER)
83
-    entry->owner = THIS_MODULE;
84
+    if (entry)
85
+	entry->owner = THIS_MODULE;
86
 #endif
87
 
88
 #if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
89
diff --git a/src/afs/LINUX/osi_proc.c b/src/afs/LINUX/osi_proc.c
90
index 974c0a7..5e3ac53 100644
91
--- a/src/afs/LINUX/osi_proc.c
92
+++ b/src/afs/LINUX/osi_proc.c
93
@@ -29,12 +29,13 @@
94
 # include <asm/ia32_unistd.h>
95
 #endif
96
 
97
-#include <linux/proc_fs.h>
98
 #include <linux/slab.h>
99
 #include <linux/init.h>
100
 #include <linux/sched.h>
101
 #include <linux/kernel.h>
102
 
103
+#include "osi_compat.h"
104
+
105
 struct proc_dir_entry *openafs_procfs;
106
 
107
 #ifdef HAVE_LINUX_SEQ_FILE_H
108
@@ -367,21 +368,18 @@ osi_proc_init(void)
109
     openafs_procfs = proc_mkdir(path, NULL);
110
 #endif
111
 #ifdef HAVE_LINUX_SEQ_FILE_H
112
-    entry = create_proc_entry("unixusers", 0, openafs_procfs);
113
-    if (entry) {
114
-	entry->proc_fops = &afs_unixuser_fops;
115
+    entry = afs_proc_create("unixusers", 0, openafs_procfs, &afs_unixuser_fops);
116
 # if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER)
117
+    if (entry)
118
 	entry->owner = THIS_MODULE;
119
 # endif
120
-    }
121
-    entry = create_proc_entry(PROC_CELLSERVDB_NAME, 0, openafs_procfs);
122
-    if (entry)
123
-	entry->proc_fops = &afs_csdb_operations;
124
+    entry = afs_proc_create(PROC_CELLSERVDB_NAME, 0, openafs_procfs, &afs_csdb_operations);
125
 #else
126
     entry = create_proc_info_entry(PROC_CELLSERVDB_NAME, (S_IFREG|S_IRUGO), openafs_procfs, csdbproc_info);
127
 #endif
128
 #if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER)
129
-    entry->owner = THIS_MODULE;
130
+    if (entry)
131
+	entry->owner = THIS_MODULE;
132
 #endif
133
 }
134
 
135
diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h
136
index f7abc2e..5840227 100644
137
--- a/src/afs/sysincludes.h
138
+++ b/src/afs/sysincludes.h
139
@@ -160,6 +160,7 @@ struct xfs_inode_info {
140
 # include <linux/sched.h>
141
 # include <linux/mm.h>
142
 # include <linux/slab.h>
143
+# include <linux/proc_fs.h>
144
 # include <linux/string.h>
145
 # if defined(HAVE_LINUX_SEMAPHORE_H)
146
 #  include <linux/semaphore.h>

Return to bug 482962