HomeFreeBSD

change how d_alias is replaced by du.d_alias

Description

change how d_alias is replaced by du.d_alias

d_alias may need to be converted to du.d_alias
depending on the kernel version.
d_alias is currently in only one place in the code which
changes
"hlist_for_each_entry(dentry, &inode->i_dentry, d_alias)"
to
"hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias)"
as neccesary.

This effectively results in a double macro expansion
for code that uses the zfs headers but already has its
own macro for just d_alias (lustre in this case).

Remove the conditional code for hlist_for_each_entry
and have a macro for "d_alias -> du.d_alias" instead.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Closes #14377

Details

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGf22254283a7f: change how d_alias is replaced by du.d_alias (authored by Gian-Carlo DeFazio <defaziogiancarlo@users.noreply.github.com>).Jan 19 2023, 8:50 PM