Index: trunk/server/common/patches/openafs-linux-3.4-end-writeback.patch
===================================================================
--- trunk/server/common/patches/openafs-linux-3.4-end-writeback.patch	(revision 2288)
+++ trunk/server/common/patches/openafs-linux-3.4-end-writeback.patch	(revision 2288)
@@ -0,0 +1,29 @@
+commit cc63cbbc138f60d6b5964fa859dcd778717b24c2
+Author: Marc Dionne <marc.c.dionne@gmail.com>
+Date:   Mon May 28 21:43:12 2012 -0400
+
+    Linux 3.4: replace end_writeback with clear_inode
+    
+    end_writeback() is renamed to clear_inode().  Add a configure test
+    and cope.
+    
+    Change-Id: Icaf5b6b54d0ee377fabcf0b295d690eaa6b4be5e
+    Reviewed-on: http://gerrit.openafs.org/7503
+    Reviewed-by: Derrick Brashear <shadow@dementix.org>
+    Tested-by: BuildBot <buildbot@rampaginggeek.com>
+    (cherry picked from commit 2b33384a4a7b88842281021129ffccc837d91d36)
+    Reviewed-on: http://gerrit.openafs.org/7578
+
+diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
+index a6be1b3..bc951a2 100644
+--- a/src/afs/LINUX/osi_vfsops.c
++++ b/src/afs/LINUX/osi_vfsops.c
+@@ -284,7 +284,7 @@ afs_evict_inode(struct inode *ip)
+        osi_Panic("inode freed while still hashed");
+ 
+     truncate_inode_pages(&ip->i_data, 0);
++    clear_inode(ip);
+-    end_writeback(ip);
+ 
+ #if !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE)
+     afs_osi_Free(ip->u.generic_ip, sizeof(struct vcache));
Index: trunk/server/common/patches/openafs-linux-3.5-encode-fh.patch
===================================================================
--- trunk/server/common/patches/openafs-linux-3.5-encode-fh.patch	(revision 2288)
+++ trunk/server/common/patches/openafs-linux-3.5-encode-fh.patch	(revision 2288)
@@ -0,0 +1,29 @@
+commit 407e7c90a97143d436ad3a6af6bbfa431c849191
+Author: Marc Dionne <marc.c.dionne@gmail.com>
+Date:   Sat Jun 2 21:35:53 2012 -0400
+
+    Linux 3.5: encode_fh API change
+    
+    The encode_fh export operation now expects two inode arguments
+    instead of a dentry and a "connectable" flag.  Use the inode of
+    the dentry we're interested in, and NULL as the parent inode which
+    is the same as passing a 0 flag in the previous API.
+    
+    Change-Id: I05cf146fb2a4bacdca20a9f108d04ccb11530804
+    Reviewed-on: http://gerrit.openafs.org/7523
+    Tested-by: BuildBot <buildbot@rampaginggeek.com>
+    Reviewed-by: Derrick Brashear <shadow@dementix.org>
+    (cherry picked from commit 5227148ae17949705487ea673d558ebfe143e635)
+    Reviewed-on: http://gerrit.openafs.org/7579
+
+--- a/src/afs/LINUX/osi_compat.h
++++ b/src/afs/LINUX/osi_compat.h
+@@ -333,7 +333,7 @@ afs_get_dentry_from_fh(struct super_block *afs_cacheSBp, afs_dcache_id_t *ainode
+ 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)
++        return dp->d_sb->s_export_op->encode_fh(dp->d_inode, &ainode->raw[0], max_lenp, NULL);
+-        return dp->d_sb->s_export_op->encode_fh(dp, &ainode->raw[0], max_lenp, 0);
+ #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;
Index: trunk/server/fedora/specs/openafs.spec.patch
===================================================================
--- trunk/server/fedora/specs/openafs.spec.patch	(revision 2283)
+++ trunk/server/fedora/specs/openafs.spec.patch	(revision 2288)
@@ -1,6 +1,6 @@
---- openafs.spec	2012-02-13 15:41:02.757592190 -0500
-+++ openafs.spec.~3~	2012-02-13 15:48:25.366294629 -0500
+--- openafs.spec.~1~	2012-03-29 12:45:12.000000000 -0400
++++ openafs.spec	2012-08-05 07:35:31.292297168 -0400
 @@ -4,7 +4,7 @@
- %define pkgvers 1.6.0
+ %define pkgvers 1.6.1
  # for beta/rc releases make pkgrel 0.<tag>
  # for real releases make pkgrel 1 (or more for extra releases)
@@ -10,5 +10,5 @@
  %{!?fedorakmod: %define fedorakmod 1}
  %{!?build_dkmspkg: %define build_dkmspkg 1}
-@@ -237,6 +237,11 @@
+@@ -252,6 +252,14 @@
  
  ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
@@ -18,9 +18,12 @@
 +Patch1002: openafs-systemd-crond.patch
 +Patch1003: openafs-systemd-csdb.patch
++Patch1004: openafs-linux-3.4-end-writeback.patch
++Patch1005: openafs-linux-3.5-encode-fh.patch
++%define _default_patch_fuzz 2
 +
  #    http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
  Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
  Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
-@@ -316,6 +325,7 @@
+@@ -331,6 +338,7 @@
  %if %{build_userspace}
  
@@ -28,7 +31,7 @@
 +Provides: scripts-openafs-client
  Requires: binutils, openafs = %{version}
- 
- %if %{fedorakmod}
-@@ -376,6 +386,7 @@
+ %if 0%{?fedora} >= 15
+ Requires: systemd-units
+@@ -403,6 +411,7 @@
  
  %if %{build_authlibs}
@@ -38,5 +41,5 @@
  Group: Networking/Filesystems
  
-@@ -392,6 +403,7 @@
+@@ -419,6 +428,7 @@
  %endif
  
@@ -46,5 +49,5 @@
  Requires: openafs-authlibs = %{version}-%{release}
  %endif
-@@ -410,6 +422,7 @@
+@@ -437,6 +447,7 @@
  libraries.
  
@@ -54,5 +57,5 @@
  Group: Development/Filesystems
  Requires: openafs = %{version}-%{release}
-@@ -439,6 +452,7 @@
+@@ -466,6 +477,7 @@
  administrators.
  
@@ -62,5 +65,5 @@
  Group: Networking/Filesystems
  Provides: openafs-kernel = %{version}
-@@ -488,6 +502,7 @@
+@@ -515,6 +527,7 @@
  
  %if %{krb5support}
@@ -70,5 +73,5 @@
  Requires: openafs = %{version}
  Group: Networking/Filesystems
-@@ -514,7 +529,7 @@
+@@ -541,7 +554,7 @@
  %if %{build_modules}
  
@@ -79,5 +82,5 @@
  %else
  
-@@ -671,6 +686,12 @@
+@@ -698,6 +711,14 @@
  #%setup -q -n %{srcdir}
  %setup -q -b 1 -n %{srcdir}
@@ -88,9 +91,11 @@
 +%patch1002 -p1 -b .systemd-crond
 +%patch1003 -p1 -b .systemd-csdb
++%patch1004 -p1 -b .end-writeback
++%patch1005 -p1 -b .encode-fh
 +
  ##############################################################################
  #
  # building
-@@ -1212,6 +1237,13 @@
+@@ -1278,6 +1299,13 @@
  rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
  rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
