From d0018ed39fb6cb8d3ce68ecaaf460b5ed3a8f005 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Fri, 20 Feb 2015 14:16:57 -0500 Subject: [PATCH] Remove patches already present in 1.6.11pre1 --- ...x-3.17-No-more-typedef-for-ctl_table.patch | 65 ----------- ...3.17-Deal-with-d_splice_alias-errors.patch | 59 ---------- ...ck-afs_lookup-return-code-explicitly.patch | 67 ------------ ..._revalidate-failure-on-mtpt-mismatch.patch | 101 ----------------- ...alidate-can-no-longer-return-an-erro.patch | 102 ------------------ ...18-key_type-no-longer-has-a-match-op.patch | 72 ------------- ...d-check-for-key_type.match-existence.patch | 97 ----------------- debian/patches/series | 7 -- 8 files changed, 570 deletions(-) delete mode 100644 debian/patches/0004-Linux-3.17-No-more-typedef-for-ctl_table.patch delete mode 100644 debian/patches/0005-Linux-3.17-Deal-with-d_splice_alias-errors.patch delete mode 100644 debian/patches/0006-LINUX-Check-afs_lookup-return-code-explicitly.patch delete mode 100644 debian/patches/0007-LINUX-Avoid-d_revalidate-failure-on-mtpt-mismatch.patch delete mode 100644 debian/patches/0008-Linux-3.18-d_invalidate-can-no-longer-return-an-erro.patch delete mode 100644 debian/patches/0009-Linux-3.18-key_type-no-longer-has-a-match-op.patch delete mode 100644 debian/patches/0010-LINUX-Avoid-check-for-key_type.match-existence.patch diff --git a/debian/patches/0004-Linux-3.17-No-more-typedef-for-ctl_table.patch b/debian/patches/0004-Linux-3.17-No-more-typedef-for-ctl_table.patch deleted file mode 100644 index f2d942ed9..000000000 --- a/debian/patches/0004-Linux-3.17-No-more-typedef-for-ctl_table.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Marc Dionne -Date: Tue, 9 Sep 2014 10:39:55 -0300 -Subject: Linux 3.17: No more typedef for ctl_table - -The typedef has been removed so we need to use the structure -directly. - -Note that the API for register_sysctl_table has also changed -with 3.17, but it reverted back to a form that existed -before and the configure tests handle it correctly. - -Reviewed-on: http://gerrit.openafs.org/11455 -Reviewed-by: Benjamin Kaduk -Tested-by: BuildBot -Reviewed-by: Perry Ruiter -Reviewed-by: Andrew Deason -Reviewed-by: D Brashear -(cherry picked from commit 6a23ca5b6e8bcaf881be7a4c50bfba72d001e6cd) - -Change-Id: Ifb8fc0b9b01d2578c65407608f0e1b3f3b254459 -Reviewed-on: http://gerrit.openafs.org/11549 -Tested-by: BuildBot -Reviewed-by: Benjamin Kaduk -Reviewed-by: Stephan Wiesand -(cherry picked from commit 75f36df74bb3c13aadb047163b93d6c24436f784) ---- - src/afs/LINUX/osi_sysctl.c | 4 ++-- - src/cf/linux-test4.m4 | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c -index a8f7fac..834e8ad 100644 ---- a/src/afs/LINUX/osi_sysctl.c -+++ b/src/afs/LINUX/osi_sysctl.c -@@ -34,7 +34,7 @@ extern afs_int32 afs_pct2; - #ifdef CONFIG_SYSCTL - static struct ctl_table_header *afs_sysctl = NULL; - --static ctl_table afs_sysctl_table[] = { -+static struct ctl_table afs_sysctl_table[] = { - { - #if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME) - #if defined(CTL_UNNUMBERED) -@@ -234,7 +234,7 @@ static ctl_table afs_sysctl_table[] = { - {0} - }; - --static ctl_table fs_sysctl_table[] = { -+static struct ctl_table fs_sysctl_table[] = { - { - #if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME) - #if defined(CTL_UNNUMBERED) -diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 -index b068af5..1759d9e 100644 ---- a/src/cf/linux-test4.m4 -+++ b/src/cf/linux-test4.m4 -@@ -395,7 +395,7 @@ AC_DEFUN([LINUX_REGISTER_SYSCTL_TABLE_NOFLAG], [ - AC_CHECK_LINUX_BUILD([whether register_sysctl_table has an insert_at_head argument], - [ac_cv_linux_register_sysctl_table_noflag], - [#include ], -- [ctl_table *t; register_sysctl_table (t);], -+ [struct ctl_table *t; register_sysctl_table (t);], - [REGISTER_SYSCTL_TABLE_NOFLAG], - [define if register_sysctl_table has no insert_at head flag], - []) diff --git a/debian/patches/0005-Linux-3.17-Deal-with-d_splice_alias-errors.patch b/debian/patches/0005-Linux-3.17-Deal-with-d_splice_alias-errors.patch deleted file mode 100644 index a8f907516..000000000 --- a/debian/patches/0005-Linux-3.17-Deal-with-d_splice_alias-errors.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Marc Dionne -Date: Thu, 25 Sep 2014 07:52:12 -0300 -Subject: Linux 3.17: Deal with d_splice_alias errors - -In 3.17 the logic in d_splice_alias has changed. Of interest to -us is the fact that it will now return an EIO error if it finds -an existing connected directory for the dentry, where it would -previously have added a new alias for it. As a result the end -user can get EIO errors when accessing any file in a volume -if the volume was first accessed through a different path (ex: -RO path vs RW path). - -This commit just restores the old behaviour, adding the directory -alias manually in the error case, which is what older versions -of d_splice_alias used to do. - -Reviewed-on: http://gerrit.openafs.org/11492 -Tested-by: BuildBot -Reviewed-by: Perry Ruiter -Reviewed-by: Andrew Deason -Reviewed-by: D Brashear -(cherry picked from commit 5815ee92a41cdcf105741d834042a5617dc4c219) - -Change-Id: Ie86009ede93255c85fcf640af14c598fe1e42ca9 -Reviewed-on: http://gerrit.openafs.org/11550 -Tested-by: BuildBot -Reviewed-by: Benjamin Kaduk -Reviewed-by: Stephan Wiesand -(cherry picked from commit 663bdfcb16ab742ef12acca110f279b749f15586) ---- - src/afs/LINUX/osi_vnodeops.c | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c -index 7e5cdd1..3ddcf42 100644 ---- a/src/afs/LINUX/osi_vnodeops.c -+++ b/src/afs/LINUX/osi_vnodeops.c -@@ -1529,9 +1529,18 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp) - /* It's ok for the file to not be found. That's noted by the caller by - * seeing that the dp->d_inode field is NULL. - */ -- if (!code || code == ENOENT) -- return newdp; -- else -+ if (!code || code == ENOENT) { -+ /* -+ * d_splice_alias can return an error (EIO) if there is an existing -+ * connected directory alias for this dentry. -+ */ -+ if (!IS_ERR(newdp)) -+ return newdp; -+ else { -+ d_add(dp, ip); -+ return NULL; -+ } -+ } else - return ERR_PTR(afs_convert_code(code)); - } - diff --git a/debian/patches/0006-LINUX-Check-afs_lookup-return-code-explicitly.patch b/debian/patches/0006-LINUX-Check-afs_lookup-return-code-explicitly.patch deleted file mode 100644 index 0591e948c..000000000 --- a/debian/patches/0006-LINUX-Check-afs_lookup-return-code-explicitly.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Andrew Deason -Date: Thu, 24 Jul 2014 11:07:45 -0500 -Subject: LINUX: Check afs_lookup return code explicitly - -Checking if the returned vcache is NULL or not is a bit of an indirect -way to check if an error occurred. Just check the return code itself, -to make sure we notice if any kind of error is reported. - -Suggested by Chas Williams. - -Reviewed-on: http://gerrit.openafs.org/11321 -Reviewed-by: Chas Williams - CONTRACTOR -Tested-by: BuildBot -Reviewed-by: D Brashear -(cherry picked from commit 2edf5c0382385f898a017fd8e0e2429f8b2b3520) - -Change-Id: I7e123ab1cf88570a6b18e438e01409ed7804e014 -Reviewed-on: http://gerrit.openafs.org/11558 -Reviewed-by: Benjamin Kaduk -Tested-by: BuildBot -Reviewed-by: Stephan Wiesand -(cherry picked from commit d3f0c37b796b02e05baf9d8270bd95d713d08b62) ---- - src/afs/LINUX/osi_vnodeops.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c -index 3ddcf42..4d29efb 100644 ---- a/src/afs/LINUX/osi_vnodeops.c -+++ b/src/afs/LINUX/osi_vnodeops.c -@@ -943,6 +943,7 @@ check_bad_parent(struct dentry *dp) - cred_t *credp; - struct dentry *parent; - struct vcache *vcp, *pvc, *avc = NULL; -+ int code; - - vcp = VTOAFS(dp->d_inode); - parent = dget_parent(dp); -@@ -952,8 +953,8 @@ check_bad_parent(struct dentry *dp) - credp = crref(); - - /* force a lookup, so vcp->mvid is fixed up */ -- afs_lookup(pvc, (char *)dp->d_name.name, &avc, credp); -- if (!avc || vcp != avc) { /* bad, very bad.. */ -+ code = afs_lookup(pvc, (char *)dp->d_name.name, &avc, credp); -+ if (code || vcp != avc) { /* bad, very bad.. */ - afs_Trace4(afs_iclSetp, CM_TRACE_TMP_1S3L, ICL_TYPE_STRING, - "check_bad_parent: bad pointer returned from afs_lookup origvc newvc dentry", - ICL_TYPE_POINTER, vcp, ICL_TYPE_POINTER, avc, -@@ -1233,7 +1234,7 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags) - - credp = crref(); - code = afs_lookup(pvcp, (char *)dp->d_name.name, &tvc, credp); -- if (!tvc || tvc != vcp) { -+ if (code || tvc != vcp) { - dput(parent); - /* Force unhash; the name doesn't point to this file - * anymore. */ -@@ -1478,7 +1479,7 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp) - AFS_GLOCK(); - code = afs_lookup(VTOAFS(dip), (char *)comp, &vcp, credp); - -- if (vcp) { -+ if (!code) { - struct vattr *vattr = NULL; - struct vcache *parent_vc = VTOAFS(dip); - diff --git a/debian/patches/0007-LINUX-Avoid-d_revalidate-failure-on-mtpt-mismatch.patch b/debian/patches/0007-LINUX-Avoid-d_revalidate-failure-on-mtpt-mismatch.patch deleted file mode 100644 index 8c1fa75ea..000000000 --- a/debian/patches/0007-LINUX-Avoid-d_revalidate-failure-on-mtpt-mismatch.patch +++ /dev/null @@ -1,101 +0,0 @@ -From: Andrew Deason -Date: Tue, 28 Oct 2014 00:10:56 -0500 -Subject: LINUX: Avoid d_revalidate failure on mtpt mismatch - -Currently, if afs_linux_dentry_revalidate is given an inode that -corresponds to a mtpt vcache ('vcp'), it resolves the mtpt to its root -dir if it's easy to do so (mvid and CMValid are set). Later on, we run -afs_lookup to see if looking up our dentry's name returns the same -vcache that we got; afs_lookup presumably will also resolve the mtpt -if it's easy to do so. - -However, it is possible that afs_linux_dentry_revalidate and -afs_lookup will make different decisions as to whether or not they -resolve a mtpt to a dir. Specifically, if CMValid is cleared after -afs_linux_dentry_revalidate checks for it, but before afs_lookup does, -then afs_lookup will return a different vcache than -afs_linux_dentry_revalidate is expecting, even though the relevant -directory entry has not changed. That is, tvc is not equal to vcp, but -tvc could be a mtpt that resolves to vcp, or vice versa. CMValid can -be cleared by another thread at virtually any time, since this is -cleared in some situations when we're not sure if the mtpt resolution -is still valid (callbacks are broken, vldb cache entries expire, etc). - -afs_linux_dentry_revalidate interprets this situation to mean that the -directory entry has changed, and so it eventually d_drop's the -associated dentry. The way that this manifests to users is that a -"fakestatted" mtpt can appear to be deleted effectively randomly, even -when nothing has changed. This can be a problem because this causes -the getcwd() syscall to return ENOENT when the working directory -involves such an affected directory. - -To fix this situation, we just detect if afs_lookup returned either -'vcp' (our possibly-resolved vcache), or the original inode associated -with the dentry we are revalidating. If the returned vcache matches -either of these, then the entry is okay and we don't need to -invalidate or drop anything. - -FIXES 131780 - -Reviewed-on: http://gerrit.openafs.org/11559 -Tested-by: BuildBot -Reviewed-by: Benjamin Kaduk -Tested-by: Anders Kaseorg -Reviewed-by: Anders Kaseorg -Reviewed-by: D Brashear -(cherry picked from commit ba1cc838ab4a80b7a7787c441a79aca31d84808c) - -Change-Id: I3273cc15ebe7fd94f3127840fdc5316bd7458e7c -Reviewed-on: http://gerrit.openafs.org/11568 -Reviewed-by: Anders Kaseorg -Tested-by: BuildBot -Reviewed-by: Benjamin Kaduk -Reviewed-by: Stephan Wiesand -(cherry picked from commit 2fd2c69257edff968ef24a1d903bd602817bbf01) ---- - src/afs/LINUX/osi_vnodeops.c | 29 ++++++++++++++++++++++++++++- - 1 file changed, 28 insertions(+), 1 deletion(-) - -diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c -index 4d29efb..9a164ea 100644 ---- a/src/afs/LINUX/osi_vnodeops.c -+++ b/src/afs/LINUX/osi_vnodeops.c -@@ -1231,10 +1231,37 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags) - if (hgetlo(pvcp->f.m.DataVersion) > dp->d_time || !(vcp->f.states & CStatd)) { - struct vattr *vattr = NULL; - int code; -+ int lookup_good; - - credp = crref(); - code = afs_lookup(pvcp, (char *)dp->d_name.name, &tvc, credp); -- if (code || tvc != vcp) { -+ -+ if (code) { -+ /* We couldn't perform the lookup, so we're not okay. */ -+ lookup_good = 0; -+ -+ } else if (tvc == vcp) { -+ /* We got back the same vcache, so we're good. */ -+ lookup_good = 1; -+ -+ } else if (tvc == VTOAFS(dp->d_inode)) { -+ /* We got back the same vcache, so we're good. This is -+ * different from the above case, because sometimes 'vcp' is -+ * not the same as the vcache for dp->d_inode, if 'vcp' was a -+ * mtpt and we evaluated it to a root dir. In rare cases, -+ * afs_lookup might not evalute the mtpt when we do, or vice -+ * versa, so the previous case will not succeed. But this is -+ * still 'correct', so make sure not to mark the dentry as -+ * invalid; it still points to the same thing! */ -+ lookup_good = 1; -+ -+ } else { -+ /* We got back a different file, so we're definitely not -+ * okay. */ -+ lookup_good = 0; -+ } -+ -+ if (!lookup_good) { - dput(parent); - /* Force unhash; the name doesn't point to this file - * anymore. */ diff --git a/debian/patches/0008-Linux-3.18-d_invalidate-can-no-longer-return-an-erro.patch b/debian/patches/0008-Linux-3.18-d_invalidate-can-no-longer-return-an-erro.patch deleted file mode 100644 index 4ff27558f..000000000 --- a/debian/patches/0008-Linux-3.18-d_invalidate-can-no-longer-return-an-erro.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Marc Dionne -Date: Thu, 23 Oct 2014 11:12:57 -0400 -Subject: Linux 3.18: d_invalidate can no longer return an error - -d_invalidate is now defined as void and does not have -a return value to check. - -Reviewed-on: http://gerrit.openafs.org/11562 -Tested-by: BuildBot -Reviewed-by: D Brashear -(cherry picked from commit a42f01d5ebb13da575b3123800ee6990743155ab) - -Change-Id: I8542404771c4a7962238efd9a53d7dfcf4011c96 -Reviewed-on: http://gerrit.openafs.org/11569 -Reviewed-by: Anders Kaseorg -Tested-by: BuildBot -Reviewed-by: Benjamin Kaduk -Reviewed-by: Andrew Deason -Reviewed-by: Stephan Wiesand -(cherry picked from commit b3527c802ad82cdecc0df6dfa42b228710ad5fd4) ---- - acinclude.m4 | 1 + - src/afs/LINUX/osi_compat.h | 11 +++++++++++ - src/afs/LINUX/osi_vcache.c | 4 +++- - src/cf/linux-test4.m4 | 13 +++++++++++++ - 4 files changed, 28 insertions(+), 1 deletion(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index 13d70db..b10cfb6 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -1024,6 +1024,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) - LINUX_IOP_I_CREATE_TAKES_BOOL - LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED - LINUX_IOP_LOOKUP_TAKES_UNSIGNED -+ LINUX_D_INVALIDATE_IS_VOID - - dnl If we are guaranteed that keyrings will work - that is - dnl a) The kernel has keyrings enabled -diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h -index c500c61..26673a7 100644 ---- a/src/afs/LINUX/osi_compat.h -+++ b/src/afs/LINUX/osi_compat.h -@@ -557,4 +557,15 @@ afs_maybe_shrink_dcache(struct dentry *dp) - #endif - } - -+static inline int -+afs_d_invalidate(struct dentry *dp) -+{ -+#if defined(D_INVALIDATE_IS_VOID) -+ d_invalidate(dp); -+ return 0; -+#else -+ return d_invalidate(dp); -+#endif -+} -+ - #endif /* AFS_LINUX_OSI_COMPAT_H */ -diff --git a/src/afs/LINUX/osi_vcache.c b/src/afs/LINUX/osi_vcache.c -index 99aab91..1d0db82 100644 ---- a/src/afs/LINUX/osi_vcache.c -+++ b/src/afs/LINUX/osi_vcache.c -@@ -13,6 +13,8 @@ - #include "afs/sysincludes.h" /*Standard vendor system headers */ - #include "afsincludes.h" /*AFS-based standard headers */ - -+#include "osi_compat.h" -+ - int - osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) { - int code; -@@ -71,7 +73,7 @@ restart: - dget(dentry); - - spin_unlock(&inode->i_lock); -- if (d_invalidate(dentry) == -EBUSY) { -+ if (afs_d_invalidate(dentry) == -EBUSY) { - dput(dentry); - /* perhaps lock and try to continue? (use cur as head?) */ - goto inuse; -diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 -index 1759d9e..34c5d4d 100644 ---- a/src/cf/linux-test4.m4 -+++ b/src/cf/linux-test4.m4 -@@ -786,3 +786,16 @@ AC_DEFUN([LINUX_IOP_LOOKUP_TAKES_UNSIGNED], [ - [define if your iops.lookup takes an unsigned int argument], - [-Werror]) - ]) -+ -+ -+AC_DEFUN([LINUX_D_INVALIDATE_IS_VOID], [ -+ AC_CHECK_LINUX_BUILD([whether d_invalidate returns void], -+ [ac_cv_linux_func_d_invalidate_returns_void], -+ [#include ], -+ [ -+ void d_invalidate(struct dentry *); -+ ], -+ [D_INVALIDATE_IS_VOID], -+ [define if your d_invalidate returns void], -+ []) -+]) diff --git a/debian/patches/0009-Linux-3.18-key_type-no-longer-has-a-match-op.patch b/debian/patches/0009-Linux-3.18-key_type-no-longer-has-a-match-op.patch deleted file mode 100644 index a841fe812..000000000 --- a/debian/patches/0009-Linux-3.18-key_type-no-longer-has-a-match-op.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: Marc Dionne -Date: Thu, 23 Oct 2014 11:27:55 -0400 -Subject: Linux 3.18: key_type no longer has a match op - -Structure key_type no longer has a match op, and -overriding the default matching has to be done -differently. - -Our current match op doesn't do anything special so there's -no need to try to override the defaults; just remove the -assignment of .match and the associated function. - -Reviewed-on: http://gerrit.openafs.org/11563 -Tested-by: BuildBot -Reviewed-by: D Brashear -(cherry picked from commit b5de4a9f42bb83ae03f2f647b11a1200a502d013) - -Change-Id: I7baca4a7f02eac45671e1e9ebf48534cdd5830be -Reviewed-on: http://gerrit.openafs.org/11570 -Reviewed-by: Anders Kaseorg -Tested-by: BuildBot -Reviewed-by: Benjamin Kaduk -Reviewed-by: Andrew Deason -Reviewed-by: Stephan Wiesand -(cherry picked from commit 9d653bd966b47223eaaf6f8a5d983b6634bdf0d5) ---- - acinclude.m4 | 3 ++- - src/afs/LINUX/osi_groups.c | 4 ++++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index b10cfb6..72dd6c1 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -840,8 +840,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) - AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h]) - AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h]) - AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [fs.h]) -- AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h]) - AC_CHECK_LINUX_STRUCT([key_type], [instantiate_prep], [key-type.h]) -+ AC_CHECK_LINUX_STRUCT([key_type], [match], [key-type.h]) -+ AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h]) - AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h]) - AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h]) - AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h]) -diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c -index f3f87c2..f1d97a6 100644 ---- a/src/afs/LINUX/osi_groups.c -+++ b/src/afs/LINUX/osi_groups.c -@@ -498,10 +498,12 @@ error: - return code; - } - -+#if defined(STRUCT_KEY_TYPE_HAS_MATCH) - static int afs_pag_match(const struct key *key, const void *description) - { - return strcmp(key->description, description) == 0; - } -+#endif - - static void afs_pag_destroy(struct key *key) - { -@@ -527,7 +529,9 @@ struct key_type key_type_afs_pag = - #else - .instantiate = afs_pag_instantiate, - #endif -+#if defined(STRUCT_KEY_TYPE_HAS_MATCH) - .match = afs_pag_match, -+#endif - .destroy = afs_pag_destroy, - }; - diff --git a/debian/patches/0010-LINUX-Avoid-check-for-key_type.match-existence.patch b/debian/patches/0010-LINUX-Avoid-check-for-key_type.match-existence.patch deleted file mode 100644 index 586de941e..000000000 --- a/debian/patches/0010-LINUX-Avoid-check-for-key_type.match-existence.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Andrew Deason -Date: Wed, 5 Nov 2014 10:22:00 -0600 -Subject: LINUX: Avoid check for key_type.match existence - -Commit b5de4a9f removed our key_type 'match' function for kernels that -do not have such a 'match' function pointer. However, this added a -configure test where we are supposed to fail for the "new" behavior, -which is discouraged. - -This causes an actual problem, because this test will fail on at least -RHEL5, due to arguably unrelated reasons (the header file for the -relevant struct is in key.h instead of key-type.h). And so, in that -situation we avoid defining a 'match' function callback, meaning our -'match' function callback is NULL, which causes a panic when we try to -actually look up keys for a PAG. - -To fix this, transform the 'match' config test into one where we -succeed for the "new" behavior. We do this by testing for the -existence of the new functionality that replaced the old 'match' -function, which is the match_preparse function (specifically, the -'cmp' field in the structure accepted by match_preparse). This should -cause unrelated compilation errors to cause us to revert to the "old" -behavior instead of the "new" behavior. At worst, this should cause -build issues if we get the config test wrong (since we will try to use -the 'match' function definition that does not exist), instead of -panicing at runtime. - -Note that while we test for key_type.match_preparse, we don't actually -use that function, since our 'match' functionality is the same as the -default behavior (according to b5de4a9f). So, we can avoid defining -any such function for newer kernels. - -Thanks to Stephan Wiesand for bisecting this issue. - -Reviewed-on: http://gerrit.openafs.org/11589 -Reviewed-by: Marc Dionne -Reviewed-by: Stephan Wiesand -Tested-by: BuildBot -Reviewed-by: Jeffrey Altman -(cherry picked from commit a9a3cb2efff7e6c020be4687b004d157bc070ac6) - -Change-Id: I59f40258c5ea35a59681f436095922d111e344f6 -Reviewed-on: http://gerrit.openafs.org/11595 -Tested-by: Anders Kaseorg -Reviewed-by: Anders Kaseorg -Tested-by: BuildBot -Reviewed-by: Marc Dionne -Reviewed-by: Benjamin Kaduk -Reviewed-by: Andrew Deason -Reviewed-by: Stephan Wiesand -(cherry picked from commit 9ff1cd92d023f9a949b499891f552b41cb0c52e4) ---- - acinclude.m4 | 2 +- - src/afs/LINUX/osi_groups.c | 10 ++++++++-- - 2 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index 72dd6c1..d324dc1 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -841,7 +841,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) - AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h]) - AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [fs.h]) - AC_CHECK_LINUX_STRUCT([key_type], [instantiate_prep], [key-type.h]) -- AC_CHECK_LINUX_STRUCT([key_type], [match], [key-type.h]) -+ AC_CHECK_LINUX_STRUCT([key_type], [match_preparse], [key-type.h]) - AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h]) - AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h]) - AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h]) -diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c -index f1d97a6..3b068e5 100644 ---- a/src/afs/LINUX/osi_groups.c -+++ b/src/afs/LINUX/osi_groups.c -@@ -498,7 +498,13 @@ error: - return code; - } - --#if defined(STRUCT_KEY_TYPE_HAS_MATCH) -+#if !defined(STRUCT_KEY_TYPE_HAS_MATCH_PREPARSE) -+/* Note that we only define a ->match function if struct -+ * key_type.match_preparse does _not_ exist. If key_type.match_preparse does -+ * exist, we would use that to specify an alternative comparison function; but -+ * since we just rely on default behavior, we don't need to actually specify -+ * one. But for kernels with no such match_preparse function, we need to -+ * specify a 'match' function, since there is no default. */ - static int afs_pag_match(const struct key *key, const void *description) - { - return strcmp(key->description, description) == 0; -@@ -529,7 +535,7 @@ struct key_type key_type_afs_pag = - #else - .instantiate = afs_pag_instantiate, - #endif --#if defined(STRUCT_KEY_TYPE_HAS_MATCH) -+#if !defined(STRUCT_KEY_TYPE_HAS_MATCH_PREPARSE) - .match = afs_pag_match, - #endif - .destroy = afs_pag_destroy, diff --git a/debian/patches/series b/debian/patches/series index fb9caaf4e..72eb97ef1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,13 +1,6 @@ 0001-userok.c-Fix-fixed-size-on-stack-path-buffers.patch 0002-Tweak-AFSDIR_PATH_MAX-definition.patch 0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch -0004-Linux-3.17-No-more-typedef-for-ctl_table.patch -0005-Linux-3.17-Deal-with-d_splice_alias-errors.patch -0006-LINUX-Check-afs_lookup-return-code-explicitly.patch -0007-LINUX-Avoid-d_revalidate-failure-on-mtpt-mismatch.patch -0008-Linux-3.18-d_invalidate-can-no-longer-return-an-erro.patch -0009-Linux-3.18-key_type-no-longer-has-a-match-op.patch -0010-LINUX-Avoid-check-for-key_type.match-existence.patch 0011-Unix-CM-Avoid-using-stale-DV-in-afs_StoreAllSegments.patch 0012-afs-Fix-some-afs_conn-overcounts.patch 0013-Linux-Move-code-to-reset-the-root-to-afs-LINUX.patch -- 2.39.5