The fields in struct dentry are re-arranged so that d_alias
shares space wth d_rcu inside the d_u union. Some references
need to change from d_alias to d_u.d_alias.
The kernel change was introduced for 3.19 but was also backported
to the 3.18 stable series in 3.18.1, so this commit is required
for 3.19 and current 3.18 kernels.
Reviewed-on: http://gerrit.openafs.org/11642
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit
d6f29679098aff171e69511823b340ccf28e5c31)
Change-Id: Ifb6199aa7fa922e64540d9fad1d2d79facbb9761
Reviewed-on: http://gerrit.openafs.org/11659
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
[backing-dev.h])
AC_CHECK_LINUX_STRUCT([cred], [session_keyring], [cred.h])
AC_CHECK_LINUX_STRUCT([ctl_table], [ctl_name], [sysctl.h])
+ AC_CHECK_LINUX_STRUCT([dentry], [d_u.d_alias], [dcache.h])
AC_CHECK_LINUX_STRUCT([dentry_operations], [d_automount], [dcache.h])
AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h])
typedef struct path afs_linux_path_t;
#endif
+#if defined(STRUCT_DENTRY_HAS_D_U_D_ALIAS)
+# define d_alias d_u.d_alias
+#endif
+
#ifndef HAVE_LINUX_DO_SYNC_READ
static inline int
do_sync_read(struct file *fp, char *buf, size_t count, loff_t *offp) {
[#include <linux/fs.h>],
[struct dentry *d = NULL;
struct hlist_node *hn = NULL;
- d->d_alias = *hn;],
+ #if defined(STRUCT_DENTRY_HAS_D_U_D_ALIAS)
+ d->d_u.d_alias = *hn;
+ #else
+ d->d_alias = *hn;
+ #endif],
[D_ALIAS_IS_HLIST],
[define if dentry->d_alias is an hlist],
[])
#include <linux/fs.h>],
[struct dentry *d = NULL, *cur;
struct inode *ip;
+ #if defined(STRUCT_DENTRY_HAS_D_U_D_ALIAS)
+ # define d_alias d_u.d_alias
+ #endif
hlist_for_each_entry(cur, &ip->i_dentry, d_alias) { }
],
[HLIST_ITERATOR_NO_NODE],