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 <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Christof Hanke 2013-09-12 09:25:31 +02:00 committed by Derrick Brashear
parent 9fea1a29df
commit 9db8b123e4
2 changed files with 6 additions and 0 deletions

View File

@ -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])

View File

@ -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,
};