diff --git a/acinclude.m4 b/acinclude.m4 index ddda7f874c..d9f5baab37 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -849,6 +849,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_STRUCT([filename], [name], [fs.h]) AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [fs.h]) AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h]) + AC_CHECK_LINUX_STRUCT([key_type], [instantiate_prep], [key-type.h]) AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h]) AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h]) AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h]) diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index cc48f6c72f..9916d2b42a 100644 --- a/src/afs/LINUX/osi_groups.c +++ b/src/afs/LINUX/osi_groups.c @@ -520,7 +520,12 @@ struct key_type key_type_afs_pag = { .name = "afs_pag", .describe = afs_pag_describe, +#if defined(STRUCT_KEY_TYPE_HAS_INSTANTIATE_PREP) + .instantiate_prep = afs_pag_instantiate, + .instantiate = NULL, +#else .instantiate = afs_pag_instantiate, +#endif .match = afs_pag_match, .destroy = afs_pag_destroy, };