Index: branches/fc15-dev/server/common/patches/openafs-0001-Linux-Add-autoconf-macro-for-structure-checks.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0001-Linux-Add-autoconf-macro-for-structure-checks.patch	(revision 1911)
+++ 	(revision )
@@ -1,52 +1,0 @@
-From 71ec6d24f675082d09926f87db2bfad639d6df74 Mon Sep 17 00:00:00 2001
-From: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Date: Tue, 27 Apr 2010 13:02:20 +0100
-Subject: [PATCH 1/8] Linux: Add autoconf macro for structure checks
-
-Add a new autoconf macro for doing structure element checks.
-
-Reviewed-on: http://gerrit.openafs.org/1853
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit 02f2c7cb3734d44dc90b77d631909373daefacd3)
-
-Change-Id: Id7768128e058805baf8d44f2610f3345b25ac973
-[andersk@mit.edu: Remove modifications of existing structure checks]
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3992
-Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4037
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- src/cf/linux-test1.m4 |   14 ++++++++++++++
- 1 files changed, 14 insertions(+), 0 deletions(-)
-
-diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4
-index 0b40eb7..2da3bb8 100644
---- a/src/cf/linux-test1.m4
-+++ b/src/cf/linux-test1.m4
-@@ -84,3 +84,17 @@ AC_DEFUN([LINUX_KBUILD_USES_EXTRA_CFLAGS], [
-     ac_linux_kbuild_requires_extra_cflags=yes)
-     CPPFLAGS="$save_CPPFLAGS"
-     AC_MSG_RESULT($ac_linux_kbuild_requires_extra_cflags)])
-+
-+dnl AC_CHECK_LINUX_STRUCT([structure], [element], [includes])
-+AC_DEFUN([AC_CHECK_LINUX_STRUCT],
-+ [AS_VAR_PUSHDEF([ac_linux_struct], [ac_cv_linux_struct_$1_has_$2])dnl
-+  AC_CACHE_CHECK([for $2 in struct $1], [ac_linux_struct],
-+   [AC_TRY_KBUILD([#include <linux/$3>],
-+		  [struct $1 _test; printk("%x\n", &_test.$2); ],
-+		  AS_VAR_SET([ac_linux_struct], [yes]),
-+		  AS_VAR_SET([ac_linux_struct], [no]))
-+   ])
-+  AS_IF([test AS_VAR_GET([ac_linux_struct]) = yes],
-+	[AC_DEFINE(AS_TR_CPP(STRUCT_$1_HAS_$2), 1,
-+		   [Define if kernel struct $1 has the $2 element])])
-+ ])
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0002-Linux-Add-general-autoconf-macro-for-Linux-kernel.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0002-Linux-Add-general-autoconf-macro-for-Linux-kernel.patch	(revision 1911)
+++ 	(revision )
@@ -1,100 +1,0 @@
-From 0b40abe79e44c98adbbd5adb80ac2f10e6d1316a Mon Sep 17 00:00:00 2001
-From: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Date: Tue, 27 Apr 2010 17:41:22 +0100
-Subject: [PATCH 2/8] Linux: Add general autoconf macro for Linux kernel
-
-Add AC_CHECK_LINUX_BUILD() to do a standardised Linux build, which
-takes a "checking" message, the autoconf variable to use to cache
-the results, headers and code to run, preprocessor variable to
-define, and a description of that variable.
-
-Reviewed-on: http://gerrit.openafs.org/1854
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit a89d6b029d059d01b8bbfc18b9ee6e3f5a964b85)
-
-Change-Id: I75c5efbf69b54e0f0b1aedcb157992e13c6a8aa7
-[andersk@mit.edu: Remove reimplementation of existing check macros]
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3993
-Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4038
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- src/cf/linux-test1.m4 |   28 ++++++++++++++++++----------
- src/cf/linux-test4.m4 |   11 +++++------
- 2 files changed, 23 insertions(+), 16 deletions(-)
-
-diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4
-index 2da3bb8..3115cdb 100644
---- a/src/cf/linux-test1.m4
-+++ b/src/cf/linux-test1.m4
-@@ -85,16 +85,24 @@ AC_DEFUN([LINUX_KBUILD_USES_EXTRA_CFLAGS], [
-     CPPFLAGS="$save_CPPFLAGS"
-     AC_MSG_RESULT($ac_linux_kbuild_requires_extra_cflags)])
- 
-+dnl AC_CHECK_LINUX_BUILD([msg], [var], [includes], [code], [define])
-+AC_DEFUN([AC_CHECK_LINUX_BUILD],
-+ [AS_VAR_PUSHDEF([ac_linux_build], [$2])dnl
-+  AC_CACHE_CHECK([$1], [ac_linux_build],
-+   [AC_TRY_KBUILD([$3], [$4],
-+		  AS_VAR_SET([ac_linux_build], [yes]),
-+		  AS_VAR_SET([ac_linux_build], [no]))
-+   ])
-+  AS_IF([test AS_VAR_GET([ac_linux_build]) = yes],
-+        [AC_DEFINE([$5],1,[$6])])
-+ ])
-+
- dnl AC_CHECK_LINUX_STRUCT([structure], [element], [includes])
- AC_DEFUN([AC_CHECK_LINUX_STRUCT],
-- [AS_VAR_PUSHDEF([ac_linux_struct], [ac_cv_linux_struct_$1_has_$2])dnl
--  AC_CACHE_CHECK([for $2 in struct $1], [ac_linux_struct],
--   [AC_TRY_KBUILD([#include <linux/$3>],
--		  [struct $1 _test; printk("%x\n", &_test.$2); ],
--		  AS_VAR_SET([ac_linux_struct], [yes]),
--		  AS_VAR_SET([ac_linux_struct], [no]))
--   ])
--  AS_IF([test AS_VAR_GET([ac_linux_struct]) = yes],
--	[AC_DEFINE(AS_TR_CPP(STRUCT_$1_HAS_$2), 1,
--		   [Define if kernel struct $1 has the $2 element])])
-+ [AC_CHECK_LINUX_BUILD([for $2 in struct $1],
-+		       [ac_cv_linux_struct_$1_has_$2],
-+		       [#include <linux/$3>],
-+		       [struct $1 _test; printk("%x\n", &_test.$2); ],
-+		       AS_TR_CPP(STRUCT_$1_HAS_$2),
-+		       [Define if kernel struct $1 has the $2 element])
-  ])
-diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
-index 89fccf5..3f22f7a 100644
---- a/src/cf/linux-test4.m4
-+++ b/src/cf/linux-test4.m4
-@@ -675,18 +675,17 @@ struct nameidata _nameidata;
- 
- 
- AC_DEFUN([LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA], [
--  AC_MSG_CHECKING([whether inode_operations.permission takes a nameidata])
--  AC_CACHE_VAL([ac_cv_linux_func_i_permission_takes_nameidata], [
--    AC_TRY_KBUILD(
-+  AC_CHECK_LINUX_BUILD([whether inode_operations.permission takes a nameidata],
-+		       [ac_cv_linux_func_i_permission_takes_nameidata],
- [#include <linux/fs.h>
- #include <linux/namei.h>],
- [struct inode _inode;
- struct dentry _dentry;
- struct nameidata _nameidata;
- (void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
--      ac_cv_linux_func_i_permission_takes_nameidata=yes,
--      ac_cv_linux_func_i_permission_takes_nameidata=no)])
--  AC_MSG_RESULT($ac_cv_linux_func_i_permission_takes_nameidata)])
-+		       [IOP_PERMISSION_TAKES_NAMEIDATA],
-+		       [define if your iops.permission takes a nameidata argument])
-+])
- 
- 
- AC_DEFUN([LINUX_IOP_I_PUT_LINK_TAKES_COOKIE], [
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0003-Linux-allow-compile-flags-to-be-passed-to-AC_CHECK_L.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0003-Linux-allow-compile-flags-to-be-passed-to-AC_CHECK_L.patch	(revision 1911)
+++ 	(revision )
@@ -1,68 +1,0 @@
-From 644c2853a171a3853bdb2d084287ff2e02dbca4f Mon Sep 17 00:00:00 2001
-From: Marc Dionne <marc.c.dionne@gmail.com>
-Date: Fri, 28 Jan 2011 19:03:39 -0500
-Subject: [PATCH 3/8] Linux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD
-
-Some linux autoconf tests require particular compile flags such as
--Werror.  Add a parameter to the AC_CHECK_LINUX_BUILD macro that
-lets the caller pass in any needed special flags.
-
-Reviewed-on: http://gerrit.openafs.org/3769
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit ca38c9546e323b59189670b80740510fb9ec5269)
-
-Change-Id: If4daa7b1202e30046d22bda5eca6b191130945ea
-[andersk@mit.edu: Remove modifications of existing tests]
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3996
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4039
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- src/cf/linux-test1.m4 |    7 +++++--
- src/cf/linux-test4.m4 |    3 ++-
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4
-index 3115cdb..97a520f 100644
---- a/src/cf/linux-test1.m4
-+++ b/src/cf/linux-test1.m4
-@@ -85,13 +85,16 @@ AC_DEFUN([LINUX_KBUILD_USES_EXTRA_CFLAGS], [
-     CPPFLAGS="$save_CPPFLAGS"
-     AC_MSG_RESULT($ac_linux_kbuild_requires_extra_cflags)])
- 
--dnl AC_CHECK_LINUX_BUILD([msg], [var], [includes], [code], [define])
-+dnl AC_CHECK_LINUX_BUILD([msg], [var], [includes], [code], [define], [CFLAGS])
- AC_DEFUN([AC_CHECK_LINUX_BUILD],
-  [AS_VAR_PUSHDEF([ac_linux_build], [$2])dnl
-   AC_CACHE_CHECK([$1], [ac_linux_build],
--   [AC_TRY_KBUILD([$3], [$4],
-+   [save_CPPFLAGS="$CPPFLAGS"
-+     CPPFLAGS="$CPPFLAGS $7"
-+     AC_TRY_KBUILD([$3], [$4],
- 		  AS_VAR_SET([ac_linux_build], [yes]),
- 		  AS_VAR_SET([ac_linux_build], [no]))
-+     CPPFLAGS="$save_CPPFLAGS"
-    ])
-   AS_IF([test AS_VAR_GET([ac_linux_build]) = yes],
-         [AC_DEFINE([$5],1,[$6])])
-diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
-index 3f22f7a..67ddf91 100644
---- a/src/cf/linux-test4.m4
-+++ b/src/cf/linux-test4.m4
-@@ -684,7 +684,8 @@ struct dentry _dentry;
- struct nameidata _nameidata;
- (void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
- 		       [IOP_PERMISSION_TAKES_NAMEIDATA],
--		       [define if your iops.permission takes a nameidata argument])
-+		       [define if your iops.permission takes a nameidata argument],
-+		       [])
- ])
- 
- 
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0004-Linux-2.6.38-Adjust-for-permission-inode-operation-c.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0004-Linux-2.6.38-Adjust-for-permission-inode-operation-c.patch	(revision 1911)
+++ 	(revision )
@@ -1,111 +1,0 @@
-From 29ef9bb31f31c371272ee9b2860729af2277ab95 Mon Sep 17 00:00:00 2001
-From: Marc Dionne <marc.c.dionne@gmail.com>
-Date: Fri, 28 Jan 2011 19:41:32 -0500
-Subject: [PATCH 4/8] Linux: 2.6.38: Adjust for permission inode operation changes
-
-The permission i_op has a new signature with a flags argument, and
-must now deal with RCU path walking.
-- Fix existing configure test for this i_op, it succeeds when it
-shouldn't
-- Add a new configure test for the new signature
-- Make our permission i_op "RCU-walk aware" - return ECHILD if
-called in that mode
-
-Reviewed-on: http://gerrit.openafs.org/3770
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit 5bcc0ea735ea519298c98b46c66bf1326cdee5e4)
-
-Change-Id: I38db16f0f62500f46fad9c92d045ccfa6cfe1c38
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3997
-Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4040
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- acinclude.m4                 |    1 +
- src/afs/LINUX/osi_vnodeops.c |   13 +++++++++++--
- src/cf/linux-test4.m4        |   16 ++++++++++++++--
- 3 files changed, 26 insertions(+), 4 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 60c47d1..de82283 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -768,6 +768,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
- 	  	 LINUX_WRITE_INODE_RETURN_TYPE
- 	  	 LINUX_IOP_I_CREATE_TAKES_NAMEIDATA
- 	  	 LINUX_IOP_I_LOOKUP_TAKES_NAMEIDATA
-+		 LINUX_IOP_I_PERMISSION_TAKES_FLAGS
- 	  	 LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA
- 	  	 LINUX_IOP_I_PUT_LINK_TAKES_COOKIE
- 	  	 LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA
-diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
-index 2389389..8352769 100644
---- a/src/afs/LINUX/osi_vnodeops.c
-+++ b/src/afs/LINUX/osi_vnodeops.c
-@@ -1786,16 +1786,25 @@ afs_linux_updatepage(struct file *fp, struct page *pp, unsigned long offset,
-  * Check access rights - returns error if can't check or permission denied.
-  */
- static int
--#ifdef IOP_PERMISSION_TAKES_NAMEIDATA
-+#if defined(IOP_PERMISSION_TAKES_FLAGS)
-+afs_linux_permission(struct inode *ip, int mode, unsigned int flags)
-+#elif defined(IOP_PERMISSION_TAKES_NAMEIDATA)
- afs_linux_permission(struct inode *ip, int mode, struct nameidata *nd)
- #else
- afs_linux_permission(struct inode *ip, int mode)
- #endif
- {
-     int code;
--    cred_t *credp = crref();
-+    cred_t *credp;
-     int tmp = 0;
- 
-+#if defined(IOP_PERMISSION_TAKES_FLAGS)
-+    /* We don't support RCU path walking */
-+    if (flags & IPERM_FLAG_RCU)
-+       return -ECHILD;
-+#endif
-+
-+    credp = crref();
-     AFS_GLOCK();
-     if (mode & MAY_EXEC)
- 	tmp |= VEXEC;
-diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
-index 67ddf91..88e4863 100644
---- a/src/cf/linux-test4.m4
-+++ b/src/cf/linux-test4.m4
-@@ -680,12 +680,24 @@ AC_DEFUN([LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA], [
- [#include <linux/fs.h>
- #include <linux/namei.h>],
- [struct inode _inode;
--struct dentry _dentry;
- struct nameidata _nameidata;
- (void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
- 		       [IOP_PERMISSION_TAKES_NAMEIDATA],
- 		       [define if your iops.permission takes a nameidata argument],
--		       [])
-+		       [-Werror])
-+])
-+
-+
-+AC_DEFUN([LINUX_IOP_I_PERMISSION_TAKES_FLAGS], [
-+  AC_CHECK_LINUX_BUILD([whether inode_operations.permission takes flags],
-+			[ac_cv_linux_func_i_permission_takes_flags],
-+			[#include <linux/fs.h>],
-+			[struct inode _inode;
-+			unsigned int flags = 0;
-+			(void)_inode.i_op->permission(&_inode, 0, flags);],
-+		       [IOP_PERMISSION_TAKES_FLAGS],
-+		       [define if your iops.permission takes a flags argument],
-+		       [-Werror])
- ])
- 
- 
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0005-linux-2.6.38-New-d_op-handling.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0005-linux-2.6.38-New-d_op-handling.patch	(revision 1911)
+++ 	(revision )
@@ -1,110 +1,0 @@
-From a615bc198e3fd99378d248eeb5868c773b0a2ec5 Mon Sep 17 00:00:00 2001
-From: Marc Dionne <marc.c.dionne@gmail.com>
-Date: Tue, 25 Jan 2011 17:17:21 -0500
-Subject: [PATCH 5/8] linux: 2.6.38: New d_op handling
-
-In 2.6.38, the super block structure has a new field to hold the
-default dentry ops.  The vfs will automatically set it for new
-dentries in most cases.
-
-Set s_d_op to our set of operations, and omit setting the dentry
-ops where the vfs will already do it (and where new locking rules
-prohibit it).
-
-Reviewed-on: http://gerrit.openafs.org/3758
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit 08bb83d95027bb3ac68834d12b72bdc647fa24a9)
-
-Change-Id: Ia808d6bcd119f3999a1805b1d31678f5a3ba3d55
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3994
-Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4041
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- acinclude.m4                 |    1 +
- src/afs/LINUX/osi_vfsops.c   |    8 ++++++++
- src/afs/LINUX/osi_vnodeops.c |    6 ++++++
- 3 files changed, 15 insertions(+), 0 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index de82283..7904e20 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -749,6 +749,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
- 		 LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE
- 		 LINUX_FS_STRUCT_SUPER_HAS_EVICT_INODE
- 		 LINUX_FS_STRUCT_SUPER_BLOCK_HAS_S_BDI
-+		 AC_CHECK_LINUX_STRUCT([super_block], [s_d_op], [fs.h])
- 		 LINUX_STRUCT_BDI_HAS_NAME
- 	         LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
- 	         LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
-diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
-index fb69d39..2a937e4 100644
---- a/src/afs/LINUX/osi_vfsops.c
-+++ b/src/afs/LINUX/osi_vfsops.c
-@@ -140,6 +140,12 @@ afs_read_super(struct super_block *sb, void *data, int silent)
-     sb->s_blocksize_bits = 10;
-     sb->s_magic = AFS_VFSMAGIC;
-     sb->s_op = &afs_sops;	/* Super block (vfs) ops */
-+
-+#if defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
-+    sb->s_d_op = &afs_dentry_operations;
-+#endif
-+
-+#if defined(AFS_LINUX26_ENV)
-     /* used for inodes backing_dev_info field, also */
-     afs_backing_dev_info = osi_Alloc(sizeof(struct backing_dev_info));
- #if defined(HAVE_BDI_INIT)
-@@ -227,7 +233,9 @@ afs_root(struct super_block *afsp)
- #else
- 		afsp->s_root = d_alloc_root(ip, NULL);
- #endif
-+#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
- 		afsp->s_root->d_op = &afs_dentry_operations;
-+#endif
- 	    } else
- 		code = ENOENT;
- 	}
-diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
-index 8352769..03294b2 100644
---- a/src/afs/LINUX/osi_vnodeops.c
-+++ b/src/afs/LINUX/osi_vnodeops.c
-@@ -1067,7 +1067,9 @@ afs_linux_create(struct inode *dip, struct dentry *dp, int mode)
- 	afs_getattr(vcp, &vattr, credp);
- 	afs_fill_inode(ip, &vattr);
- 	insert_inode_hash(ip);
-+#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
- 	dp->d_op = &afs_dentry_operations;
-+#endif
- 	dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
- 	d_instantiate(dp, ip);
-     }
-@@ -1123,7 +1125,9 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp)
- 	    )
- 	    insert_inode_hash(ip);
-     }
-+#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
-     dp->d_op = &afs_dentry_operations;
-+#endif
-     dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
-     AFS_GUNLOCK();
- 
-@@ -1315,7 +1319,9 @@ afs_linux_mkdir(struct inode *dip, struct dentry *dp, int mode)
- 	afs_getattr(tvcp, &vattr, credp);
- 	afs_fill_inode(ip, &vattr);
- 
-+#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
- 	dp->d_op = &afs_dentry_operations;
-+#endif
- 	dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
- 	d_instantiate(dp, ip);
-     }
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0006-linux-2.6.38-Make-d_revalidate-RCU-walk-aware.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0006-linux-2.6.38-Make-d_revalidate-RCU-walk-aware.patch	(revision 1911)
+++ 	(revision )
@@ -1,51 +1,0 @@
-From 7bcd8c5884683a38cbe04faa631bda15b38a492b Mon Sep 17 00:00:00 2001
-From: Marc Dionne <marc.c.dionne@gmail.com>
-Date: Tue, 25 Jan 2011 18:18:56 -0500
-Subject: [PATCH 6/8] linux: 2.6.38: Make d_revalidate RCU-walk aware
-
-Signal to the vfs that we don't support path RCU walk in
-d_revalidate.  It will call back in non-RCU mode.
-
-Reviewed-on: http://gerrit.openafs.org/3759
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit 52556d50298e4a636f07e9a3cf0b6557c882c82d)
-
-Change-Id: Id346ca87a1a064ab7d66140156cb8eb48a888566
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3995
-Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4042
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- src/afs/LINUX/osi_vnodeops.c |    6 ++++++
- 1 files changed, 6 insertions(+), 0 deletions(-)
-
-diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
-index 03294b2..e2a3e28 100644
---- a/src/afs/LINUX/osi_vnodeops.c
-+++ b/src/afs/LINUX/osi_vnodeops.c
-@@ -865,10 +865,16 @@ afs_linux_dentry_revalidate(struct dentry *dp)
-     int valid;
-     struct afs_fakestat_state fakestate;
- 
-+#ifdef LOOKUP_RCU
-+    /* We don't support RCU path walking */
-+    if (nd->flags & LOOKUP_RCU)
-+       return -ECHILD;
-+#endif
- #ifdef AFS_LINUX24_ENV
-     lock_kernel();
- #endif
-     AFS_GLOCK();
-+
-     afs_InitFakeStat(&fakestate);
- 
-     if (dp->d_inode) {
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0007-Linux-2.6.38-deal-with-dcache_lock-removal.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0007-Linux-2.6.38-deal-with-dcache_lock-removal.patch	(revision 1911)
+++ 	(revision )
@@ -1,164 +1,0 @@
-From 2c3b79c8c242d12398eff647753370787b7cf300 Mon Sep 17 00:00:00 2001
-From: Marc Dionne <marc.c.dionne@gmail.com>
-Date: Fri, 28 Jan 2011 20:59:17 -0500
-Subject: [PATCH 7/8] Linux: 2.6.38: deal with dcache_lock removal
-
-dcache_lock is gone in 2.6.38, and some of the vfs locking rules
-have changed.
-
-Of interest for openafs:
-- inode->i_lock protects the d_alias list
-- dentry->d_lock protects d_unhashed()
-
-Add a new configure test for dcache_lock, and replace its use by
-the appropriate new lock(s).
-
-Reviewed-on: http://gerrit.openafs.org/3771
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit 2eca7aef7b2940e4ef5f9901ce28481af6edb6dd)
-
-Change-Id: Ie405bb1e40cca4ba83bca3e051e2ab54b8850ac6
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3998
-Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4043
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- acinclude.m4          |    1 +
- src/afs/afs_daemons.c |    8 ++++++++
- src/afs/afs_vcache.c  |   35 +++++++++++++++++++++++++++++++++--
- src/cf/linux-test4.m4 |   11 +++++++++++
- 4 files changed, 53 insertions(+), 2 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 7904e20..655fb11 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -817,6 +817,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
- 		 LINUX_GENERIC_FILE_AIO_READ
- 		 LINUX_INIT_WORK_HAS_DATA
- 		 LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
-+		 LINUX_HAVE_DCACHE_LOCK
- 		 LINUX_SYSCTL_TABLE_CHECKING
- 		 LINUX_STRUCT_CTL_TABLE_HAS_CTL_NAME
- 		 LINUX_HAVE_IGET
-diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c
-index bd5bba8..3d9d977 100644
---- a/src/afs/afs_daemons.c
-+++ b/src/afs/afs_daemons.c
-@@ -376,7 +376,11 @@ afs_CheckRootVolume(void)
- 		    dp = d_find_alias(AFSTOV(afs_globalVp));
- 		    
- #if defined(AFS_LINUX24_ENV)
-+#if defined(HAVE_DCACHE_LOCK)
- 		    spin_lock(&dcache_lock);
-+#else
-+		    spin_lock(&AFSTOV(vcp)->i_lock);
-+#endif
- #if defined(AFS_LINUX26_ENV)
- 		    spin_lock(&dp->d_lock);
- #endif
-@@ -388,7 +392,11 @@ afs_CheckRootVolume(void)
- #if defined(AFS_LINUX26_ENV)
- 		    spin_unlock(&dp->d_lock);
- #endif
-+#if defined(HAVE_DCACHE_LOCK)
- 		    spin_unlock(&dcache_lock);
-+#else
-+		    spin_unlock(&AFSTOV(vcp)->i_lock);
-+#endif
- #endif
- 		    dput(dp);
- 		    
-diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c
-index 201bae7..63e6a27 100644
---- a/src/afs/afs_vcache.c
-+++ b/src/afs/afs_vcache.c
-@@ -673,12 +673,15 @@ afs_ShakeLooseVCaches(afs_int32 anumber)
- #if defined(AFS_LINUX22_ENV)
- 	    if (tvc != afs_globalVp && VREFCOUNT(tvc) > 1 && tvc->opens == 0) {
-                 struct dentry *dentry;
-+		struct inode *inode = AFSTOV(tvc);
-                 struct list_head *cur, *head;
-                 AFS_GUNLOCK();
-+
-+#if defined(HAVE_DCACHE_LOCK)
- #if defined(AFS_LINUX24_ENV)
-                 spin_lock(&dcache_lock);
- #endif
--		head = &(AFSTOV(tvc))->i_dentry;
-+		head = &inode->i_dentry;
- 
- restart:
-                 cur = head;
-@@ -687,7 +690,6 @@ restart:
- 
- 		    if (d_unhashed(dentry))
- 			continue;
--
- 		    dget_locked(dentry);
- 
- #if defined(AFS_LINUX24_ENV)
-@@ -707,6 +709,35 @@ restart:
- #if defined(AFS_LINUX24_ENV)
- 		spin_unlock(&dcache_lock);
- #endif
-+#else /* HAVE_DCACHE_LOCK */
-+		spin_lock(&inode->i_lock);
-+		head = &inode->i_dentry;
-+
-+restart:
-+		cur = head;
-+		while ((cur = cur->next) != head) {
-+		    dentry = list_entry(cur, struct dentry, d_alias);
-+
-+		    spin_lock(&dentry->d_lock);
-+		    if (d_unhashed(dentry)) {
-+			spin_unlock(&dentry->d_lock);
-+			continue;
-+		    }
-+		    spin_unlock(&dentry->d_lock);
-+		    dget(dentry);
-+
-+		    spin_unlock(&inode->i_lock);
-+		    if (d_invalidate(dentry) == -EBUSY) {
-+			dput(dentry);
-+			/* perhaps lock and try to continue? (use cur as head?) */
-+			goto inuse;
-+		    }
-+		    dput(dentry);
-+		    spin_lock(&inode->i_lock);
-+		    goto restart;
-+		}
-+		spin_unlock(&inode->i_lock);
-+#endif /* HAVE_DCACHE_LOCK */
- 	    inuse:
- 		AFS_GLOCK();
- 	    }
-diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
-index 88e4863..2f426ce 100644
---- a/src/cf/linux-test4.m4
-+++ b/src/cf/linux-test4.m4
-@@ -1316,3 +1316,14 @@ AC_DEFUN([LINUX_HAVE_INODE_SETATTR], [
-   if test "x$ac_cv_linux_inode_setattr" = "xyes"; then
-     AC_DEFINE([HAVE_LINUX_INODE_SETATTR], 1, [define if your kernel has inode_setattr()])
-   fi])
-+
-+AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [
-+  AC_CHECK_LINUX_BUILD([for dcache_lock],
-+			[ac_cv_linux_have_dcache_lock],
-+			[#include <linux/dcache.h> ],
-+			[printk("%p", &dcache_lock);],
-+			[HAVE_DCACHE_LOCK],
-+			[define if dcache_lock exists],
-+			[])
-+])
-+
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0008-Linux-2.6.38-dentry-d_count-is-not-an-atomic.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0008-Linux-2.6.38-dentry-d_count-is-not-an-atomic.patch	(revision 1911)
+++ 	(revision )
@@ -1,86 +1,0 @@
-From 7c3999e05c928991d22e3eeae2c69e5759c6ea4a Mon Sep 17 00:00:00 2001
-From: Marc Dionne <marc.c.dionne@gmail.com>
-Date: Wed, 2 Feb 2011 21:55:27 -0500
-Subject: [PATCH 8/8] Linux: 2.6.38: dentry->d_count is not an atomic
-
-d_count is now an int protected by the dentry's d_lock.
-Take the lock when we use it, instead of using an atomic_*
-function.
-
-Reviewed-on: http://gerrit.openafs.org/3883
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-(cherry picked from commit 281f5bf5fbb0a546edcce62ef4e097ae9bbdbf73)
-
-Change-Id: Id6b17d9cfe18d348a66df02f6b309fc53b00da86
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
-Reviewed-on: http://gerrit.openafs.org/3999
-Tested-by: BuildBot <buildbot@rampaginggeek.com>
-Reviewed-by: Russ Allbery <rra@stanford.edu>
-Reviewed-on: http://gerrit.openafs.org/4044
-Reviewed-by: Derrick Brashear <shadow@dementia.org>
-Tested-by: Derrick Brashear <shadow@dementia.org>
----
- acinclude.m4                 |    1 +
- src/afs/LINUX/osi_vnodeops.c |    9 +++++++++
- src/cf/linux-test4.m4        |   12 ++++++++++++
- 3 files changed, 22 insertions(+), 0 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 655fb11..c3f5e15 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -818,6 +818,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
- 		 LINUX_INIT_WORK_HAS_DATA
- 		 LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
- 		 LINUX_HAVE_DCACHE_LOCK
-+		 LINUX_D_COUNT_IS_INT
- 		 LINUX_SYSCTL_TABLE_CHECKING
- 		 LINUX_STRUCT_CTL_TABLE_HAS_CTL_NAME
- 		 LINUX_HAVE_IGET
-diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
-index e2a3e28..3118ec7 100644
---- a/src/afs/LINUX/osi_vnodeops.c
-+++ b/src/afs/LINUX/osi_vnodeops.c
-@@ -1396,9 +1396,18 @@ afs_linux_rename(struct inode *oldip, struct dentry *olddp,
- #endif
- 
- #if defined(AFS_LINUX24_ENV)
-+#if defined(D_COUNT_INT)
-+    spin_lock(&olddp->d_lock);
-+    if (olddp->d_count > 1) {
-+	spin_unlock(&olddp->d_lock);
-+	shrink_dcache_parent(olddp);
-+    } else
-+	spin_unlock(&olddp->d_lock);
-+#else
-     if (atomic_read(&olddp->d_count) > 1)
- 	shrink_dcache_parent(olddp);
- #endif
-+#endif
- 
-     AFS_GLOCK();
-     code = afs_rename(VTOAFS(oldip), oldname, VTOAFS(newip), newname, credp);
-diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
-index 2f426ce..b428f37 100644
---- a/src/cf/linux-test4.m4
-+++ b/src/cf/linux-test4.m4
-@@ -1327,3 +1327,15 @@ AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [
- 			[])
- ])
- 
-+
-+AC_DEFUN([LINUX_D_COUNT_IS_INT], [
-+  AC_CHECK_LINUX_BUILD([if dentry->d_count is an int],
-+			[ac_cv_linux_d_count_int],
-+			[#include <linux/dcache.h> ],
-+			[struct dentry _d;
-+			dget(&_d);
-+			_d.d_count = 1;],
-+			[D_COUNT_INT],
-+			[define if dentry->d_count is an int],
-+			[-Werror])
-+])
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-0009-fix-broken-earlier.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-0009-fix-broken-earlier.patch	(revision 1911)
+++ 	(revision )
@@ -1,67 +1,0 @@
-From 1f4c2d96550e8c51178a68633965e4f0b788bc39 Mon Sep 17 00:00:00 2001
-From: Anders Kaseorg <andersk@mit.edu>
-Date: Sat, 30 Apr 2011 23:35:02 -0400
-Subject: [PATCH] =?UTF-8?q?Fix=20cherry-pick=20of=20=E2=80=9Clinux:=202.6.38:=20New=20d=5Fop=20handling=E2=80=9D?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Conflicts in this cherry-pick (http://gerrit.openafs.org/4041) were
-resolved incorrectly.  The correct resolution of
-"""
- <<<<<<< HEAD
- ||||||| parent of 0d95e6b... linux: 2.6.38: New d_op handling
- #if defined(AFS_LINUX26_ENV)
- =======
-
- #if defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
-     sb->s_d_op = &afs_dentry_operations;
- #endif
-
- #if defined(AFS_LINUX26_ENV)
- >>>>>>> 0d95e6b... linux: 2.6.38: New d_op handling
-"""
-is
-"""
-
- #if defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
-     sb->s_d_op = &afs_dentry_operations;
- #endif
-
-"""
-and not
-"""
-
- #if defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
-     sb->s_d_op = &afs_dentry_operations;
- #endif
-
- #if defined(AFS_LINUX26_ENV)
-"""
-
-As usual, it’s impossible to tell the difference in the default
-conflict style, so I urge everyone reading this to run
-
-git config --global merge.conflictstyle diff3
-
-Change-Id: I09fb77b2f1d80beda7b81fa1f40f663117dae920
-Signed-off-by: Anders Kaseorg <andersk@mit.edu>
----
- src/afs/LINUX/osi_vfsops.c |    1 -
- 1 files changed, 0 insertions(+), 1 deletions(-)
-
-diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
-index 2a937e4..904bd79 100644
---- a/src/afs/LINUX/osi_vfsops.c
-+++ b/src/afs/LINUX/osi_vfsops.c
-@@ -145,7 +145,6 @@ afs_read_super(struct super_block *sb, void *data, int silent)
-     sb->s_d_op = &afs_dentry_operations;
- #endif
- 
--#if defined(AFS_LINUX26_ENV)
-     /* used for inodes backing_dev_info field, also */
-     afs_backing_dev_info = osi_Alloc(sizeof(struct backing_dev_info));
- #if defined(HAVE_BDI_INIT)
--- 
-1.7.3.4
-
Index: branches/fc15-dev/server/common/patches/openafs-localcsdb.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-localcsdb.patch	(revision 1911)
+++ 	(revision )
@@ -1,11 +1,0 @@
---- openafs-1.4/src/packaging/RedHat/openafs-client.init.orig	2009-04-14 04:28:32.000000000 -0400
-+++ openafs-1.4/src/packaging/RedHat/openafs-client.init	2009-04-14 04:27:08.000000000 -0400
-@@ -14,7 +14,7 @@
- 
- start() {
-         echo -n $"Updating CellServDB: "
--        cat /usr/vice/etc/CellServDB.local /usr/vice/etc/CellServDB.dist > \
-+        cat /usr/vice/etc/CellServDB.local > \
-                /usr/vice/etc/CellServDB
-         chmod 644 /usr/vice/etc/CellServDB
-         echo
Index: branches/fc15-dev/server/common/patches/openafs-numsysnames.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-numsysnames.patch	(revision 1911)
+++ 	(revision )
@@ -1,11 +1,0 @@
---- openafs-1.4.10/src/afs/afs.h.orig	2009-06-06 21:02:53.000000000 -0400
-+++ openafs-1.4.10/src/afs/afs.h	2009-06-06 21:03:28.000000000 -0400
-@@ -75,7 +75,7 @@
- #define	PIGGYSIZE	1350	/* max piggyback size */
- #define	MAXVOLS		128	/* max vols we can store */
- #define	MAXSYSNAME	128	/* max sysname (i.e. @sys) size */
--#define MAXNUMSYSNAMES	16	/* max that current constants allow */
-+#define MAXNUMSYSNAMES	32	/* max that current constants allow */
- #define	NOTOKTIMEOUT	(2*3600)	/* time after which to timeout conns sans tokens */
- #define	NOPAG		0xffffffff
- #define AFS_NCBRS	300	/* max # of call back return entries */
Index: branches/fc15-dev/server/common/patches/openafs-scripts.patch
===================================================================
--- branches/fc15-dev/server/common/patches/openafs-scripts.patch	(revision 1911)
+++ branches/fc15-dev/server/common/patches/openafs-scripts.patch	(revision 1913)
@@ -4,4 +4,6 @@
 # and Anders Kaseorg <andersk@mit.edu>
 # and Edward Z. Yang <ezyang@mit.edu>
+# and Benjamin Kaduk <kaduk@mit.edu>
+# and Alexander Chernyakhovsky <achernya@mit.edu>
 #
 # This file is available under both the MIT license and the GPL.
@@ -43,59 +45,104 @@
 # See /COPYRIGHT in this repository for more information.
 #
-diff -ur openafs-1.4/src/afs/afs_analyze.c openafs-1.4+scripts/src/afs/afs_analyze.c
---- openafs-1.4/src/afs/afs_analyze.c
-+++ openafs-1.4+scripts/src/afs/afs_analyze.c
-@@ -585,7 +585,7 @@
- 			 (afid ? afid->Fid.Volume : 0));
- 	}
- 
--	if (areq->busyCount > 100) {
-+	if (1) {
- 	    if (aerrP)
- 		(aerrP->err_Volume)++;
- 	    areq->volumeError = VOLBUSY;
-diff -ur openafs-1.4/src/afs/LINUX/osi_vnodeops.c openafs-1.4+scripts/src/afs/LINUX/osi_vnodeops.c
---- openafs-1.4/src/afs/LINUX/osi_vnodeops.c
-+++ openafs-1.4+scripts/src/afs/LINUX/osi_vnodeops.c
-@@ -896,6 +896,28 @@
+diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
+index 7c7705e..0d0e94f 100644
+--- a/src/afs/LINUX/osi_vnodeops.c
++++ b/src/afs/LINUX/osi_vnodeops.c
+@@ -904,6 +904,28 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
  	/* should we always update the attributes at this point? */
  	/* unlikely--the vcache entry hasn't changed */
  
 +	/* [scripts] This code makes hardlinks work correctly.
-+	 *
-+	 * We want Apache to be able to read a file with hardlinks
-+	 * named .htaccess and foo to be able to read it via .htaccess
-+	 * and not via foo, regardless of which name was looked up
-+	 * (remember, inodes do not have filenames associated with them.)
-+	 *
-+	 * It is important that we modify the existing cache entry even
-+	 * if it is otherwise totally valid and would not be reloaded.
-+	 * Otherwise, it won't recover from repeatedly reading the same
-+	 * inode via multiple hardlinks or different names.  Specifically,
-+	 * Apache will be able to read both names if it was first looked
-+	 * up (by anyone!) via .htaccess, and neither if it was first
-+	 * looked up via foo.
-+	 *
-+	 * With regards to performance, the strncmp() is bounded by
-+	 * three characters, so it takes O(3) operations.  If this code
-+	 * is extended to all static-cat extensions, we'll want to do
-+	 * some clever hashing using gperf here.
-+	 */
++	*
++	* We want Apache to be able to read a file with hardlinks
++	* named .htaccess and foo to be able to read it via .htaccess
++	* and not via foo, regardless of which name was looked up
++	* (remember, inodes do not have filenames associated with them.)
++	*
++	* It is important that we modify the existing cache entry even
++	* if it is otherwise totally valid and would not be reloaded.
++	* Otherwise, it won't recover from repeatedly reading the same
++	* inode via multiple hardlinks or different names.  Specifically,
++	* Apache will be able to read both names if it was first looked
++	* up (by anyone!) via .htaccess, and neither if it was first
++	* looked up via foo.
++	*
++	* With regards to performance, the strncmp() is bounded by
++	* three characters, so it takes O(3) operations.  If this code
++	* is extended to all static-cat extensions, we'll want to do
++	* some clever hashing using gperf here.
++	*/
 +	vcp->apache_access = strncmp(dp->d_name.name, ".ht", 3) == 0;
 +
+ 	dput(parent);
      } else {
  #ifdef notyet
- 	pvcp = VTOAFS(dp->d_parent->d_inode);		/* dget_parent()? */
-diff -ur openafs-1.4/src/afs/VNOPS/afs_vnop_lookup.c openafs-1.4+scripts/src/afs/VNOPS/afs_vnop_lookup.c
---- openafs-1.4/src/afs/VNOPS/afs_vnop_lookup.c
-+++ openafs-1.4+scripts/src/afs/VNOPS/afs_vnop_lookup.c
-@@ -1572,6 +1572,12 @@
+diff --git a/src/afs/VNOPS/afs_vnop_access.c b/src/afs/VNOPS/afs_vnop_access.c
+index eabcfeb..6390850 100644
+--- a/src/afs/VNOPS/afs_vnop_access.c
++++ b/src/afs/VNOPS/afs_vnop_access.c
+@@ -130,6 +130,15 @@ afs_AccessOK(struct vcache *avc, afs_int32 arights, struct vrequest *areq,
+ 	    dirBits = PRSFS_LOOKUP | PRSFS_READ;
+ 	    return (arights == (dirBits & arights));
+ 	}
++	if ( areq->uid == globalpag &&
++	    !(areq->realuid == avc->f.fid.Fid.Volume) &&
++	    !((avc->f.anyAccess | arights) == avc->f.anyAccess) &&
++	    !(((arights & ~(PRSFS_LOOKUP|PRSFS_READ)) == 0) && areq->realuid == HTTPD_UID) &&
++	    !(((arights & ~(PRSFS_LOOKUP|PRSFS_READ)) == 0) && areq->realuid == POSTFIX_UID) &&
++	    !(areq->realuid == 0 && PRSFS_USR3 == afs_GetAccessBits(avc, PRSFS_USR3, areq)) &&
++	    !((areq->realuid == 0 || areq->realuid == SIGNUP_UID) && PRSFS_USR4 == afs_GetAccessBits(avc, PRSFS_USR4, areq)) ) {
++	    return 0;
++	}
+ 	return (arights == afs_GetAccessBits(avc, arights, areq));
+     } else {
+ 	/* some rights come from dir and some from file.  Specifically, you 
+@@ -183,6 +192,19 @@ afs_AccessOK(struct vcache *avc, afs_int32 arights, struct vrequest *areq,
+ 		    fileBits |= PRSFS_READ;
+ 	    }
+ 	}
++
++	if ( areq->uid == globalpag &&
++	    !(areq->realuid == avc->f.fid.Fid.Volume) &&
++	    !((avc->f.anyAccess | arights) == avc->f.anyAccess) &&
++	    !(arights == PRSFS_LOOKUP && areq->realuid == HTTPD_UID) &&
++	    !(arights == PRSFS_LOOKUP && areq->realuid == POSTFIX_UID) &&
++	    !(arights == PRSFS_READ && areq->realuid == HTTPD_UID &&
++		(avc->f.m.Mode == 0100777 || avc->apache_access)) &&
++	    !(areq->realuid == 0 && PRSFS_USR3 == afs_GetAccessBits(avc, PRSFS_USR3, areq)) &&
++	    !((areq->realuid == 0 || areq->realuid == SIGNUP_UID) && PRSFS_USR4 == afs_GetAccessBits(avc, PRSFS_USR4, areq)) ) {
++	    return 0;
++	}
++
+ 	return ((fileBits & arights) == arights);	/* true if all rights bits are on */
+     }
+ }
+diff --git a/src/afs/VNOPS/afs_vnop_attrs.c b/src/afs/VNOPS/afs_vnop_attrs.c
+index b3931e5..71ef05c 100644
+--- a/src/afs/VNOPS/afs_vnop_attrs.c
++++ b/src/afs/VNOPS/afs_vnop_attrs.c
+@@ -88,8 +88,8 @@ afs_CopyOutAttrs(struct vcache *avc, struct vattr *attrs)
+ 	}
+     }
+ #endif /* AFS_DARWIN_ENV */
+-    attrs->va_uid = fakedir ? 0 : avc->f.m.Owner;
+-    attrs->va_gid = fakedir ? 0 : avc->f.m.Group;	/* yeah! */
++    attrs->va_uid = fakedir ? 0 : avc->f.fid.Fid.Volume;
++    attrs->va_gid = (avc->f.m.Owner == DAEMON_SCRIPTS_PTSID ? avc->f.m.Group : avc->f.m.Owner);
+ #if defined(AFS_SUN56_ENV)
+     attrs->va_fsid = avc->v.v_vfsp->vfs_fsid.val[0];
+ #elif defined(AFS_DARWIN80_ENV)
+diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c
+index 8e7af1c..7e984e9 100644
+--- a/src/afs/VNOPS/afs_vnop_lookup.c
++++ b/src/afs/VNOPS/afs_vnop_lookup.c
+@@ -1877,6 +1877,12 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr
      }
  
    done:
 +    if (tvc) {
-+	/* [scripts] check Apache's ability to read this file, so that
-+	 * we can figure this out on an access() call */
-+	tvc->apache_access = strncmp(aname, ".ht", 3) == 0;
++    /* [scripts] check Apache's ability to read this file, so that
++    * we can figure this out on an access() call */
++    tvc->apache_access = strncmp(aname, ".ht", 3) == 0;
 +    }
 +
@@ -103,10 +150,11 @@
      if (tname != aname && tname)
  	osi_FreeLargeSpace(tname);
-diff -ur openafs-1.4/src/afs/afs.h openafs-1.4+scripts/src/afs/afs.h
---- openafs-1.4/src/afs/afs.h
-+++ openafs-1.4+scripts/src/afs/afs.h
-@@ -208,8 +208,16 @@
- #define QTOC(e)	    QEntry(e, struct cell, lruq)
- #define QTOVH(e)    QEntry(e, struct vcache, vhashq)
+diff --git a/src/afs/afs.h b/src/afs/afs.h
+index fcc4c70..0d53af6 100644
+--- a/src/afs/afs.h
++++ b/src/afs/afs.h
+@@ -233,8 +233,16 @@ struct afs_slotlist {
+     struct afs_slotlist *next;
+ };
  
 +#define AFSAGENT_UID (101)
@@ -123,5 +171,5 @@
      afs_int32 flags;		/* things like O_SYNC, O_NONBLOCK go here */
      char initd;			/* if non-zero, Error fields meaningful */
-@@ -743,6 +751,7 @@
+@@ -872,6 +880,7 @@ struct vcache {
  #ifdef AFS_SUN5_ENV
      short multiPage;		/* count of multi-page getpages in progress */
@@ -131,8 +179,22 @@
  
  #define	DONT_CHECK_MODE_BITS	0
-diff -ur openafs-1.4/src/afs/afs_osi_pag.c openafs-1.4+scripts/src/afs/afs_osi_pag.c
---- openafs-1.4/src/afs/afs_osi_pag.c
-+++ openafs-1.4+scripts/src/afs/afs_osi_pag.c
-@@ -49,6 +49,8 @@
+diff --git a/src/afs/afs_analyze.c b/src/afs/afs_analyze.c
+index 1834e6d..673a8e6 100644
+--- a/src/afs/afs_analyze.c
++++ b/src/afs/afs_analyze.c
+@@ -368,7 +368,7 @@ afs_Analyze(struct afs_conn *aconn, afs_int32 acode,
+ 			 (afid ? afid->Fid.Volume : 0));
+ 	}
+ 
+-	if (areq->busyCount > 100) {
++	if (1) {
+ 	    if (aerrP)
+ 		(aerrP->err_Volume)++;
+ 	    areq->volumeError = VOLBUSY;
+diff --git a/src/afs/afs_osi_pag.c b/src/afs/afs_osi_pag.c
+index c888605..ff5cf2d 100644
+--- a/src/afs/afs_osi_pag.c
++++ b/src/afs/afs_osi_pag.c
+@@ -49,6 +49,8 @@ afs_uint32 pagCounter = 0;
  #endif
  /* Local variables */
@@ -143,14 +205,14 @@
   * Pags are implemented as follows: the set of groups whose long
   * representation is '41XXXXXX' hex are used to represent the pags.
-@@ -449,6 +451,15 @@
- 	av->uid = acred->cr_ruid;	/* default when no pag is set */
+@@ -484,6 +486,15 @@ afs_InitReq(struct vrequest *av, afs_ucred_t *acred)
+ 	av->uid = afs_cr_uid(acred);	/* default when no pag is set */
  #endif
      }
 +
-+    av->realuid = acred->cr_ruid;
-+    if(!globalpag && acred->cr_ruid == AFSAGENT_UID) {
++    av->realuid = afs_cr_uid(acred);
++    if(!globalpag && av->realuid == AFSAGENT_UID) {
 +      globalpag = av->uid;
 +    }
-+    else if (globalpag && av->uid == acred->cr_ruid) {
++    else if (globalpag && av->uid == av->realuid) {
 +      av->uid = globalpag;
 +    }
@@ -159,13 +221,14 @@
  }
  
-diff -ur openafs-1.4/src/afs/afs_pioctl.c openafs-1.4+scripts/src/afs/afs_pioctl.c
---- openafs-1.4/src/afs/afs_pioctl.c
-+++ openafs-1.4+scripts/src/afs/afs_pioctl.c
-@@ -1221,6 +1221,10 @@
+diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c
+index f282510..00f1360 100644
+--- a/src/afs/afs_pioctl.c
++++ b/src/afs/afs_pioctl.c
+@@ -1405,6 +1405,10 @@ DECL_PIOCTL(PSetAcl)
      struct AFSFetchStatus OutStatus;
      XSTATS_DECLS;
  
 +    if (areq->uid == globalpag && areq->realuid != AFSAGENT_UID) {
-+      return EACCES;
++	return EACCES;
 +    }
 +
@@ -173,5 +236,5 @@
      if (!avc)
  	return EINVAL;
-@@ -1441,6 +1445,10 @@
+@@ -1790,6 +1794,10 @@ DECL_PIOCTL(PSetTokens)
      struct vrequest treq;
      afs_int32 flag, set_parent_pag = 0;
@@ -184,18 +247,19 @@
      if (!afs_resourceinit_flag) {
  	return EIO;
-@@ -1800,6 +1808,10 @@
-     afs_int32 iterator;
+@@ -2231,6 +2239,11 @@ DECL_PIOCTL(PGetTokens)
      int newStyle;
+     int code = E2BIG;
  
 +    if (areq->uid == globalpag && areq->realuid != AFSAGENT_UID &&
-+	areq->realuid != 0 && areq->realuid != SIGNUP_UID)
++	areq->realuid != 0 && areq->realuid != SIGNUP_UID) {
 +	return EDOM;
++    }
 +
      AFS_STATCNT(PGetTokens);
      if (!afs_resourceinit_flag)	/* afs daemons haven't started yet */
  	return EIO;		/* Inappropriate ioctl for device */
-@@ -1883,6 +1895,10 @@
-     register afs_int32 i;
-     register struct unixuser *tu;
+@@ -2341,6 +2354,10 @@ DECL_PIOCTL(PUnlog)
+     afs_int32 i;
+     struct unixuser *tu;
  
 +    if (areq->uid == globalpag && areq->realuid != AFSAGENT_UID) {
@@ -206,57 +270,15 @@
      if (!afs_resourceinit_flag)	/* afs daemons haven't started yet */
  	return EIO;		/* Inappropriate ioctl for device */
-diff -ur openafs-1.4/src/afs/VNOPS/afs_vnop_access.c openafs-1.4+scripts/src/afs/VNOPS/afs_vnop_access.c
---- openafs-1.4/src/afs/VNOPS/afs_vnop_access.c
-+++ openafs-1.4+scripts/src/afs/VNOPS/afs_vnop_access.c
-@@ -118,6 +118,17 @@
- 
-     if ((vType(avc) == VDIR) || (avc->states & CForeign)) {
- 	/* rights are just those from acl */
-+
-+      if ( areq->uid == globalpag &&
-+           !(areq->realuid == avc->fid.Fid.Volume) &&
-+           !((avc->anyAccess | arights) == avc->anyAccess) &&
-+           !(((arights & ~(PRSFS_LOOKUP|PRSFS_READ)) == 0) && areq->realuid == HTTPD_UID) &&
-+           !(((arights & ~(PRSFS_LOOKUP|PRSFS_READ)) == 0) && areq->realuid == POSTFIX_UID) &&
-+           !(areq->realuid == 0 && PRSFS_USR3 == afs_GetAccessBits(avc, PRSFS_USR3, areq)) &&
-+           !((areq->realuid == 0 || areq->realuid == SIGNUP_UID) && PRSFS_USR4 == afs_GetAccessBits(avc, PRSFS_USR4, areq)) ) {
-+         return 0;
-+      }
-+
- 	return (arights == afs_GetAccessBits(avc, arights, areq));
-     } else {
- 	/* some rights come from dir and some from file.  Specifically, you 
-@@ -171,6 +182,19 @@
- 		    fileBits |= PRSFS_READ;
- 	    }
- 	}
-+	
-+        if ( areq->uid == globalpag &&
-+             !(areq->realuid == avc->fid.Fid.Volume) &&
-+             !((avc->anyAccess | arights) == avc->anyAccess) &&
-+             !(arights == PRSFS_LOOKUP && areq->realuid == HTTPD_UID) &&
-+             !(arights == PRSFS_LOOKUP && areq->realuid == POSTFIX_UID) &&
-+             !(arights == PRSFS_READ && areq->realuid == HTTPD_UID &&
-+                 (avc->m.Mode == 0100777 || avc->apache_access)) &&
-+             !(areq->realuid == 0 && PRSFS_USR3 == afs_GetAccessBits(avc, PRSFS_USR3, areq)) &&
-+             !((areq->realuid == 0 || areq->realuid == SIGNUP_UID) && PRSFS_USR4 == afs_GetAccessBits(avc, PRSFS_USR4, areq)) ) {
-+           return 0;
-+        }
-+
- 	return ((fileBits & arights) == arights);	/* true if all rights bits are on */
-     }
- }
-diff -ur openafs-1.4/src/afs/VNOPS/afs_vnop_attrs.c openafs-1.4+scripts/src/afs/VNOPS/afs_vnop_attrs.c
---- openafs-1.4/src/afs/VNOPS/afs_vnop_attrs.c
-+++ openafs-1.4+scripts/src/afs/VNOPS/afs_vnop_attrs.c
-@@ -87,8 +87,8 @@
- 	}
-     }
- #endif /* AFS_DARWIN_ENV */
--    attrs->va_uid = fakedir ? 0 : avc->m.Owner;
--    attrs->va_gid = fakedir ? 0 : avc->m.Group;	/* yeah! */
-+    attrs->va_uid = fakedir ? 0 : avc->fid.Fid.Volume;
-+    attrs->va_gid = (avc->m.Owner == DAEMON_SCRIPTS_PTSID ? avc->m.Group : avc->m.Owner);
- #if defined(AFS_SUN56_ENV)
-     attrs->va_fsid = avc->v.v_vfsp->vfs_fsid.val[0];
- #elif defined(AFS_OSF_ENV)
+diff --git a/src/packaging/RedHat/openafs-client.init b/src/packaging/RedHat/openafs-client.init
+index 10ec647..a4ecbc8 100644
+--- a/src/packaging/RedHat/openafs-client.init
++++ b/src/packaging/RedHat/openafs-client.init
+@@ -14,7 +14,7 @@
+ 
+ start() {
+         echo -n $"Updating CellServDB: "
+-        cat /usr/vice/etc/CellServDB.local /usr/vice/etc/CellServDB.dist > \
++        cat /usr/vice/etc/CellServDB.local > \
+                /usr/vice/etc/CellServDB
+         chmod 644 /usr/vice/etc/CellServDB
+         echo
Index: branches/fc15-dev/server/fedora/Makefile
===================================================================
--- branches/fc15-dev/server/fedora/Makefile	(revision 1911)
+++ branches/fc15-dev/server/fedora/Makefile	(revision 1913)
@@ -40,6 +40,5 @@
 server_url	= "http://web.mit.edu/scripts/src"
 server_arch	= "fedora.stable"
-openafs_url	= "http://dl.openafs.org/dl/openafs/1.4.14/openafs-1.4.14-1.1.1.src.rpm"
-#openafs_url	= "http://web.mit.edu/~scripts/rpm-fc13/openafs-1.4.12.1-1.0.pre3.src.rpm"
+openafs_url	= "http://dl.openafs.org/dl/openafs/candidate/1.6.0pre6/openafs-1.6.0-0.pre6.src.rpm"
 zephyr_url	= "http://zephyr.1ts.org/export/HEAD/distribution/zephyr-3.0.1.tar.gz"
 
Index: branches/fc15-dev/server/fedora/specs/openafs.spec.patch
===================================================================
--- branches/fc15-dev/server/fedora/specs/openafs.spec.patch	(revision 1911)
+++ branches/fc15-dev/server/fedora/specs/openafs.spec.patch	(revision 1913)
@@ -1,34 +1,23 @@
---- openafs.spec.orig	2010-09-10 18:21:53.000000000 -0400
-+++ openafs.spec	2010-09-10 18:34:30.000000000 -0400
-@@ -8,7 +8,7 @@
- # for beta/rc releases make pkgrel 0.X.<tag>
+--- openafs.spec.orig	2011-06-20 15:32:57.000000000 -0400
++++ openafs.spec	2011-06-20 17:45:49.000000000 -0400
+@@ -4,7 +4,7 @@
+ %define pkgvers 1.6.0
+ # for beta/rc releases make pkgrel 0.<tag>
  # for real releases make pkgrel 1 (or more for extra releases)
- #%define pkgrel 0.1.rc1
--%define pkgrel 1.1
-+%define pkgrel 1.1.99scripts.%{scriptsversion}
+-%define pkgrel 0.pre6
++%define pkgrel 0.pre6.99.scripts.%{scriptsversion}
  
- %if %{?osvers:0}%{!?osvers:1}
- %define osvers 1
-@@ -261,6 +261,19 @@
+ %{!?fedorakmod: %define fedorakmod 1}
+ %{!?build_dkmspkg: %define build_dkmspkg 1}
+@@ -247,6 +247,8 @@
  %endif
  ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
  
 +Patch1000: openafs-scripts.patch
-+Patch1003: openafs-localcsdb.patch
-+Patch1005: openafs-numsysnames.patch
-+Patch1006: openafs-0001-Linux-Add-autoconf-macro-for-structure-checks.patch
-+Patch1007: openafs-0002-Linux-Add-general-autoconf-macro-for-Linux-kernel.patch
-+Patch1008: openafs-0003-Linux-allow-compile-flags-to-be-passed-to-AC_CHECK_L.patch
-+Patch1009: openafs-0004-Linux-2.6.38-Adjust-for-permission-inode-operation-c.patch
-+Patch1010: openafs-0005-linux-2.6.38-New-d_op-handling.patch
-+Patch1011: openafs-0006-linux-2.6.38-Make-d_revalidate-RCU-walk-aware.patch
-+Patch1012: openafs-0007-Linux-2.6.38-deal-with-dcache_lock-removal.patch
-+Patch1013: openafs-0008-Linux-2.6.38-dentry-d_count-is-not-an-atomic.patch
-+Patch1014: openafs-0009-fix-broken-earlier.patch
 +
  #    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
-@@ -343,6 +347,7 @@
+@@ -326,6 +328,7 @@
  %if %{build_userspace}
  
@@ -38,5 +27,5 @@
  
  %if %{fedorakmod}
-@@ -403,6 +408,7 @@
+@@ -386,6 +389,7 @@
  
  %if %{build_authlibs}
@@ -46,5 +35,5 @@
  Group: Networking/Filesystems
  
-@@ -419,6 +425,7 @@
+@@ -402,6 +406,7 @@
  %endif
  
@@ -54,5 +43,5 @@
  Requires: openafs-authlibs = %{version}
  %endif
-@@ -437,6 +444,7 @@
+@@ -420,6 +425,7 @@
  libraries.
  
@@ -62,5 +51,5 @@
  Group: Development/Filesystems
  
-@@ -465,6 +473,7 @@
+@@ -448,6 +454,7 @@
  administrators.
  
@@ -70,5 +59,5 @@
  Group: Networking/Filesystems
  Provides: openafs-kernel = %{version}
-@@ -514,6 +523,7 @@
+@@ -497,6 +504,7 @@
  
  %if %{krb5support}
@@ -78,5 +67,5 @@
  Requires: openafs = %{version}
  Group: Networking/Filesystems
-@@ -540,7 +550,7 @@
+@@ -523,7 +531,7 @@
  %if %{build_modules}
  
@@ -87,30 +76,26 @@
  %else
  
-@@ -699,6 +709,18 @@
+@@ -680,6 +688,9 @@
+ #%setup -q -n %{srcdir}
+ %setup -q -b 1 -n %{srcdir}
  
- # Patch openafs to build a kernel module named "openafs" instead of "libafs"
- %patch0 -p1 -b .kmod26
++# Apply the Scripts patch
 +%patch1000 -p1 -b .scripts
-+%patch1003 -p1 -b .localcsdb
-+%patch1005 -p1 -b .numsysnames
-+%patch1006 -p1 -b .0001
-+%patch1007 -p1 -b .0002
-+%patch1008 -p1 -b .0003
-+%patch1009 -p1 -b .0004
-+%patch1010 -p1 -b .0005
-+%patch1011 -p1 -b .0006
-+%patch1012 -p1 -b .0007
-+%patch1013 -p1 -b .0008
-+%patch1014 -p1 -b .0009
- 
++
  ##############################################################################
  #
-@@ -1140,7 +1140,6 @@
- %{_bindir}/bos
- %{_bindir}/fs
- %{_bindir}/kapasswd
--%{_bindir}/kpasswd
- %{_bindir}/klog
- %{_bindir}/klog.krb
- %{_bindir}/pagsh
-
+ # building
+@@ -1215,6 +1226,13 @@
+ rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
+ rm -f $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
+ rm -f $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
++%else
++chmod +x $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so
++chmod +x $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so
++chmod +x $RPM_BUILD_ROOT%{_libdir}/libafsauthent.so.*
++chmod +x $RPM_BUILD_ROOT%{_libdir}/libafsrpc.so.*
++chmod +x $RPM_BUILD_ROOT%{_libdir}/libkopenafs.so
++chmod +x $RPM_BUILD_ROOT%{_libdir}/libkopenafs.so.*
+ %endif
+ 
+ %endif
