mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
Linux 3.7: key instantiate API change
Adapt to the new parameters for the instantiate key operation. Change-Id: I25dea3489b68cad662e962a4973ee98ec7228cd3 Reviewed-on: http://gerrit.openafs.org/8470 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
This commit is contained in:
parent
007ec3e25e
commit
aeb2763b74
@ -825,6 +825,7 @@ 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([filename], [name], [fs.h])
|
AC_CHECK_LINUX_STRUCT([filename], [name], [fs.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])
|
||||||
|
@ -457,7 +457,11 @@ static void afs_pag_describe(const struct key *key, struct seq_file *m)
|
|||||||
seq_printf(m, ": %u", key->datalen);
|
seq_printf(m, ": %u", key->datalen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(STRUCT_KEY_TYPE_HAS_PREPARSE)
|
||||||
|
static int afs_pag_instantiate(struct key *key, struct key_preparsed_payload *prep)
|
||||||
|
#else
|
||||||
static int afs_pag_instantiate(struct key *key, const void *data, size_t datalen)
|
static int afs_pag_instantiate(struct key *key, const void *data, size_t datalen)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int code;
|
int code;
|
||||||
afs_uint32 *userpag, pag = NOPAG;
|
afs_uint32 *userpag, pag = NOPAG;
|
||||||
@ -468,7 +472,11 @@ static int afs_pag_instantiate(struct key *key, const void *data, size_t datalen
|
|||||||
code = -EINVAL;
|
code = -EINVAL;
|
||||||
get_group_info(current_group_info());
|
get_group_info(current_group_info());
|
||||||
|
|
||||||
|
#if defined(STRUCT_KEY_TYPE_HAS_PREPARSE)
|
||||||
|
if (prep->datalen != sizeof(afs_uint32) || !prep->data)
|
||||||
|
#else
|
||||||
if (datalen != sizeof(afs_uint32) || !data)
|
if (datalen != sizeof(afs_uint32) || !data)
|
||||||
|
#endif
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* ensure key being set matches current pag */
|
/* ensure key being set matches current pag */
|
||||||
@ -477,7 +485,11 @@ static int afs_pag_instantiate(struct key *key, const void *data, size_t datalen
|
|||||||
if (pag == NOPAG)
|
if (pag == NOPAG)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
userpag = (afs_uint32 *) data;
|
#if defined(STRUCT_KEY_TYPE_HAS_PREPARSE)
|
||||||
|
userpag = (afs_uint32 *)prep->data;
|
||||||
|
#else
|
||||||
|
userpag = (afs_uint32 *)data;
|
||||||
|
#endif
|
||||||
if (*userpag != pag)
|
if (*userpag != pag)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user