diff -Nru openafs-1.6.20/debian/changelog openafs-1.6.20/debian/changelog --- openafs-1.6.20/debian/changelog 2016-12-04 22:49:15.000000000 +0000 +++ openafs-1.6.20/debian/changelog 2017-02-14 19:57:26.000000000 +0000 @@ -1,3 +1,9 @@ +openafs (1.6.20-2ubuntu1) zesty; urgency=medium + + * Cherry pick proposed patch to fix build with Linux 4.10. + + -- Seth Forshee Tue, 14 Feb 2017 13:57:26 -0600 + openafs (1.6.20-2) unstable; urgency=medium * Build-Depend debhelper (>= 9.20160114) for dh_strip diff -Nru openafs-1.6.20/debian/control openafs-1.6.20/debian/control --- openafs-1.6.20/debian/control 2016-12-04 22:28:46.000000000 +0000 +++ openafs-1.6.20/debian/control 2017-02-14 19:57:26.000000000 +0000 @@ -1,7 +1,8 @@ Source: openafs Section: net Priority: optional -Maintainer: Benjamin Kaduk +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Benjamin Kaduk Uploaders: Russ Allbery , Sam Hartman , Anders Kaseorg Build-Depends: debhelper (>= 9.20160114~), autoconf, automake, bison, comerr-dev, diff -Nru openafs-1.6.20/debian/patches/Linux-4.10-have_submounts-is-gone.patch openafs-1.6.20/debian/patches/Linux-4.10-have_submounts-is-gone.patch --- openafs-1.6.20/debian/patches/Linux-4.10-have_submounts-is-gone.patch 1970-01-01 00:00:00.000000000 +0000 +++ openafs-1.6.20/debian/patches/Linux-4.10-have_submounts-is-gone.patch 2017-02-14 19:57:04.000000000 +0000 @@ -0,0 +1,88 @@ +From: Mark Vitale +Date: Wed, 7 Dec 2016 16:11:45 +0000 (-0500) +Subject: Linux 4.10: have_submounts is gone +X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=5f7754ca2fe66f101c1ebebdb95b44931224fbd5 + +Linux 4.10: have_submounts is gone + +Linux commit f74e7b33c37e vfs: remove unused have_submounts() function +(v4.10-rc2) removes have_submounts from the tree after providing a +replacement (path_has_submounts) for its last in-tree caller, autofs. + +However, it turns out that OpenAFS is better off not using the new +path_has_submounts. Instead, OpenAFS could/should have stopped using +have_submounts() much earlier, back in Linux v3.18 when d_invalidate +became void. At that time, most in-tree callers of have_submounts had +already been converted to use check_submounts_and_drop back in v3.12. +At v3.18, a series of commits modified check_submounts_and_drop to +automatically remove child submounts (instead of returning -EBUSY if a +submount was detected), then subsumed it into d_invalidate. The end +result was that VFS now implicitly handles much of the housekeeping +previously called explicitly by the various filesystem d_revalidate +routines: +- shrink_dcache_parent +- check_submounts_and_drop +- d_drop +- d_invalidate +All in-tree filesystem d_revalidate routines were updated to take +advantage of this new VFS support. + +Modify afs_linux_dentry_revalidate to no longer perform any special +handling for invalid dentries when D_INVALIDATE_IS_VOID. Instead, allow +our VFS caller to properly clean up any invalid dentry when we return 0. + +Change-Id: I0c4d777e6d445857c395a7b5f9a43c9024b098e9 +--- + +Index: openafs-1.6.20/src/afs/LINUX/osi_vnodeops.c +=================================================================== +--- openafs-1.6.20.orig/src/afs/LINUX/osi_vnodeops.c ++++ openafs-1.6.20/src/afs/LINUX/osi_vnodeops.c +@@ -1319,6 +1319,10 @@ afs_linux_dentry_revalidate(struct dentr + good_dentry: + valid = 1; + ++/* everything beyond this point should be cleaned up after I get it working correctly.*/ ++/* however, I don't think we want to change the order of the bad_dentry logic; it ++ * probably still needs to happen under GLOCK? ++ */ + done: + /* Clean up */ + if (tvc) +@@ -1328,6 +1332,17 @@ afs_linux_dentry_revalidate(struct dentr + if (credp) + crfree(credp); + ++#ifndef D_INVALIDATE_IS_VOID ++ /* When (v3.18) d_invalidate was converted to void, it also started ++ * being called automatically from revalidate, and automatically ++ * handled: ++ * - shrink_dcache_parent ++ * - automatic detach of submounts ++ * - d_drop ++ * Therefore, after that point, OpenAFS revalidate logic no longer needs ++ * to do any of those things itself for invalid denty structs. We only need ++ * to tell VFS it's invalid (by returning 0), and VFS will handle the rest. ++ */ + if (!valid) { + /* + * If we had a negative lookup for the name we want to forcibly +@@ -1340,14 +1355,16 @@ afs_linux_dentry_revalidate(struct dentr + } else + d_invalidate(dp); + } +- ++#endif + return valid; + + bad_dentry: ++ valid = 0; ++#ifndef D_INVALIDATE_IS_VOID + if (have_submounts(dp)) + valid = 1; + else +- valid = 0; ++#endif + goto done; + } + diff -Nru openafs-1.6.20/debian/patches/series openafs-1.6.20/debian/patches/series --- openafs-1.6.20/debian/patches/series 2016-12-04 22:34:02.000000000 +0000 +++ openafs-1.6.20/debian/patches/series 2017-02-14 19:56:54.000000000 +0000 @@ -7,3 +7,4 @@ Linux-4.9-inode_operation-rename-now-takes-flags.patch Linux-4.9-inode_change_ok-becomes-setattr_prepare.patch AFS_component_version_number.c-Respect-SOURCE_DATE_E.patch +Linux-4.10-have_submounts-is-gone.patch