diff -Nru openafs-1.6.1/debian/changelog openafs-1.6.1/debian/changelog --- openafs-1.6.1/debian/changelog 2012-08-21 20:12:01.000000000 -0400 +++ openafs-1.6.1/debian/changelog 2012-09-11 19:02:15.000000000 -0400 @@ -1,3 +1,12 @@ +openafs (1.6.1-2ubuntu1) quantal; urgency=low + + * Apply upstream deltas for Linux 3.5 (Closes: #685973) + (LP: #1015925): + - [2b33384] Linux 3.4: replace end_writeback with clear_inode + - [5227148] Linux 3.5: encode_fh API change + + -- Anders Kaseorg Tue, 11 Sep 2012 19:01:20 -0400 + openafs (1.6.1-2) unstable; urgency=low * Translation updates: diff -Nru openafs-1.6.1/debian/control openafs-1.6.1/debian/control --- openafs-1.6.1/debian/control 2012-08-21 20:12:01.000000000 -0400 +++ openafs-1.6.1/debian/control 2012-09-11 19:05:47.000000000 -0400 @@ -1,7 +1,8 @@ Source: openafs Section: net Priority: optional -Maintainer: Russ Allbery +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Russ Allbery Uploaders: Sam Hartman Build-Depends: debhelper (>= 9), autoconf, automake, bison, comerr-dev, cpio, dblatex, dkms (>= 2.1.1.1), docbook-xsl, doxygen, flex, diff -Nru openafs-1.6.1/debian/patches/debian-changes openafs-1.6.1/debian/patches/debian-changes --- openafs-1.6.1/debian/patches/debian-changes 2012-08-21 20:14:42.000000000 -0400 +++ openafs-1.6.1/debian/patches/debian-changes 2012-09-11 19:05:58.000000000 -0400 @@ -8,6 +8,74 @@ For full commit history and separated commits, see the packaging Git repository. +--- openafs-1.6.1.orig/acinclude.m4 ++++ openafs-1.6.1/acinclude.m4 +@@ -840,6 +840,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinu + #include ], + [struct page *_page; + int bchecked = PageFsMisc(_page);]) ++ AC_CHECK_LINUX_FUNC([clear_inode], ++ [#include ], ++ [clear_inode(NULL);]) + AC_CHECK_LINUX_FUNC([current_kernel_time], + [#include ], + [struct timespec s; +@@ -955,6 +958,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinu + LINUX_D_COUNT_IS_INT + LINUX_IOP_MKDIR_TAKES_UMODE_T + LINUX_IOP_CREATE_TAKES_UMODE_T ++ LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES + + dnl If we are guaranteed that keyrings will work - that is + dnl a) The kernel has keyrings enabled +--- openafs-1.6.1.orig/src/cf/linux-test4.m4 ++++ openafs-1.6.1/src/cf/linux-test4.m4 +@@ -661,3 +661,17 @@ AC_DEFUN([LINUX_IOP_CREATE_TAKES_UMODE_T + [define if inode.i_op->create takes a umode_t argument], + [-Werror]) + ]) ++ ++ ++AC_DEFUN([LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES], [ ++ AC_CHECK_LINUX_BUILD([whether export operation encode_fh takes inode arguments], ++ [ac_cv_linux_export_op_encode_fh__takes_inodes], ++ [#include ], ++ [struct export_operations _exp_ops; ++ int _encode_fh(struct inode *i, __u32 *fh, int *len, struct inode *p) ++ {return 0;}; ++ _exp_ops.encode_fh = _encode_fh;], ++ [EXPORT_OP_ENCODE_FH_TAKES_INODES], ++ [define if encode_fh export op takes inode arguments], ++ [-Werror]) ++]) +--- openafs-1.6.1.orig/src/afs/LINUX/osi_compat.h ++++ openafs-1.6.1/src/afs/LINUX/osi_compat.h +@@ -333,7 +333,11 @@ afs_get_dentry_from_fh(struct super_bloc + static inline int + afs_get_fh_from_dentry(struct dentry *dp, afs_ufs_dcache_id_t *ainode, int *max_lenp) { + if (dp->d_sb->s_export_op->encode_fh) ++#if defined(EXPORT_OP_ENCODE_FH_TAKES_INODES) ++ return dp->d_sb->s_export_op->encode_fh(dp->d_inode, &ainode->raw[0], max_lenp, NULL); ++#else + return dp->d_sb->s_export_op->encode_fh(dp, &ainode->raw[0], max_lenp, 0); ++#endif + #if defined(NEW_EXPORT_OPS) + /* If fs doesn't provide an encode_fh method, assume the default INO32 type */ + *max_lenp = sizeof(struct fid)/4; +--- openafs-1.6.1.orig/src/afs/LINUX/osi_vfsops.c ++++ openafs-1.6.1/src/afs/LINUX/osi_vfsops.c +@@ -284,7 +284,11 @@ afs_evict_inode(struct inode *ip) + osi_Panic("inode freed while still hashed"); + + truncate_inode_pages(&ip->i_data, 0); ++#if defined(HAVE_LINUX_CLEAR_INODE) ++ clear_inode(ip); ++#else + end_writeback(ip); ++#endif + + #if !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE) + afs_osi_Free(ip->u.generic_ip, sizeof(struct vcache)); --- openafs-1.6.1.orig/src/packaging/Debian/sysname +++ openafs-1.6.1/src/packaging/Debian/sysname @@ -9,7 +9,7 @@ case `dpkg --print-architecture` in