LINUX: make d_automount work properly on rhel5 kernels
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 17 Aug 2012 17:25:17 +0000 (13:25 -0400)
committerDerrick Brashear <shadow@dementix.org>
Thu, 30 Aug 2012 16:02:05 +0000 (09:02 -0700)
Recent centos/rhel 5 kernels (2.6.18-308.*) started providing the
d_automount operation, but renamed the DCACHE_NEED_AUTOMOUNT flag to
DMANAGED_AUTOMOUNT.

Change-Id: I74811f8967d52ce482316b110e9dd616a4869a7f
Reviewed-on: http://gerrit.openafs.org/8006
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/afs/LINUX/osi_compat.h

index 322d88f..0314a22 100644 (file)
 # endif
 #endif
 
+#if defined(STRUCT_DENTRY_OPERATIONS_HAS_D_AUTOMOUNT) && !defined(DCACHE_NEED_AUTOMOUNT)
+# define DCACHE_NEED_AUTOMOUNT DMANAGED_AUTOMOUNT
+#endif
+
 #ifdef HAVE_LINUX_STRUCT_VFS_PATH
 typedef struct vfs_path afs_linux_path_t;
 #else