Linux 3.18: key_type no longer has a match op

Structure key_type no longer has a match op, and
overriding the default matching has to be done
differently.

Our current match op doesn't do anything special so there's
no need to try to override the defaults; just remove the
assignment of .match and the associated function.

Change-Id: I0ee195e47f40688d9a71ea62a0b87a4265363f05
Reviewed-on: http://gerrit.openafs.org/11563
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
This commit is contained in:
Marc Dionne 2014-10-23 11:27:55 -04:00 committed by D Brashear
parent a42f01d5eb
commit b5de4a9f42
2 changed files with 6 additions and 1 deletions

View File

@ -890,8 +890,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h]) AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h])
AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h]) AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h])
AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [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([key_type], [instantiate_prep], [key-type.h])
AC_CHECK_LINUX_STRUCT([key_type], [match], [key-type.h])
AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h])
AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h]) AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h])
AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h]) AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h])
AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h]) AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h])

View File

@ -498,10 +498,12 @@ error:
return code; return code;
} }
#if defined(STRUCT_KEY_TYPE_HAS_MATCH)
static int afs_pag_match(const struct key *key, const void *description) static int afs_pag_match(const struct key *key, const void *description)
{ {
return strcmp(key->description, description) == 0; return strcmp(key->description, description) == 0;
} }
#endif
static void afs_pag_destroy(struct key *key) static void afs_pag_destroy(struct key *key)
{ {
@ -527,7 +529,9 @@ struct key_type key_type_afs_pag =
#else #else
.instantiate = afs_pag_instantiate, .instantiate = afs_pag_instantiate,
#endif #endif
#if defined(STRUCT_KEY_TYPE_HAS_MATCH)
.match = afs_pag_match, .match = afs_pag_match,
#endif
.destroy = afs_pag_destroy, .destroy = afs_pag_destroy,
}; };