From 9db8b123e4dab6c25ef4166ad3fa74aaa0f630f4 Mon Sep 17 00:00:00 2001 From: Christof Hanke Date: Thu, 12 Sep 2013 09:25:31 +0200 Subject: [PATCH] LINUX: Keyring deal with suse-specific key_type op instantiate_prep used for checking for STRUCT_KEY_TYPE_HAS_PREPARSE Change-Id: Ia7411e85467ba418dfefa5cd7c2d570fe20a5a68 Reviewed-on: http://gerrit.openafs.org/10194 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: BuildBot --- acinclude.m4 | 1 + src/afs/LINUX/osi_groups.c | 5 +++++ 2 files changed, 6 insertions(+) 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, };