fscrypt: rename get_crypt_info() to fscrypt_get_crypt_info()
To avoid namespace collisions, rename get_crypt_info() to fscrypt_get_crypt_info(). The function is only used inside the fs/crypto directory, so declare it in the new header file, fscrypt_private.h. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
parent
db717d8e26
commit
3325bea5b2
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <linux/scatterlist.h>
|
#include <linux/scatterlist.h>
|
||||||
#include <linux/ratelimit.h>
|
#include <linux/ratelimit.h>
|
||||||
#include <linux/fscrypto.h>
|
#include "fscrypt_private.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fname_crypt_complete() - completion callback for filename crypto
|
* fname_crypt_complete() - completion callback for filename crypto
|
||||||
@ -350,7 +350,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname,
|
|||||||
fname->disk_name.len = iname->len;
|
fname->disk_name.len = iname->len;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ret = get_crypt_info(dir);
|
ret = fscrypt_get_crypt_info(dir);
|
||||||
if (ret && ret != -EOPNOTSUPP)
|
if (ret && ret != -EOPNOTSUPP)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
19
fs/crypto/fscrypt_private.h
Normal file
19
fs/crypto/fscrypt_private.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* fscrypt_private.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2015, Google, Inc.
|
||||||
|
*
|
||||||
|
* This contains encryption key functions.
|
||||||
|
*
|
||||||
|
* Written by Michael Halcrow, Ildar Muslukhov, and Uday Savagaonkar, 2015.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _FSCRYPT_PRIVATE_H
|
||||||
|
#define _FSCRYPT_PRIVATE_H
|
||||||
|
|
||||||
|
#include <linux/fscrypto.h>
|
||||||
|
|
||||||
|
/* keyinfo.c */
|
||||||
|
extern int fscrypt_get_crypt_info(struct inode *);
|
||||||
|
|
||||||
|
#endif /* _FSCRYPT_PRIVATE_H */
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <keys/user-type.h>
|
#include <keys/user-type.h>
|
||||||
#include <linux/scatterlist.h>
|
#include <linux/scatterlist.h>
|
||||||
#include <linux/fscrypto.h>
|
#include "fscrypt_private.h"
|
||||||
|
|
||||||
static void derive_crypt_complete(struct crypto_async_request *req, int rc)
|
static void derive_crypt_complete(struct crypto_async_request *req, int rc)
|
||||||
{
|
{
|
||||||
@ -178,7 +178,7 @@ static void put_crypt_info(struct fscrypt_info *ci)
|
|||||||
kmem_cache_free(fscrypt_info_cachep, ci);
|
kmem_cache_free(fscrypt_info_cachep, ci);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_crypt_info(struct inode *inode)
|
int fscrypt_get_crypt_info(struct inode *inode)
|
||||||
{
|
{
|
||||||
struct fscrypt_info *crypt_info;
|
struct fscrypt_info *crypt_info;
|
||||||
struct fscrypt_context ctx;
|
struct fscrypt_context ctx;
|
||||||
@ -327,7 +327,7 @@ int fscrypt_get_encryption_info(struct inode *inode)
|
|||||||
(ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
|
(ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
|
||||||
(1 << KEY_FLAG_REVOKED) |
|
(1 << KEY_FLAG_REVOKED) |
|
||||||
(1 << KEY_FLAG_DEAD)))))
|
(1 << KEY_FLAG_DEAD)))))
|
||||||
return get_crypt_info(inode);
|
return fscrypt_get_crypt_info(inode);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(fscrypt_get_encryption_info);
|
EXPORT_SYMBOL(fscrypt_get_encryption_info);
|
||||||
|
@ -265,7 +265,6 @@ extern int fscrypt_has_permitted_context(struct inode *, struct inode *);
|
|||||||
extern int fscrypt_inherit_context(struct inode *, struct inode *,
|
extern int fscrypt_inherit_context(struct inode *, struct inode *,
|
||||||
void *, bool);
|
void *, bool);
|
||||||
/* keyinfo.c */
|
/* keyinfo.c */
|
||||||
extern int get_crypt_info(struct inode *);
|
|
||||||
extern int fscrypt_get_encryption_info(struct inode *);
|
extern int fscrypt_get_encryption_info(struct inode *);
|
||||||
extern void fscrypt_put_encryption_info(struct inode *, struct fscrypt_info *);
|
extern void fscrypt_put_encryption_info(struct inode *, struct fscrypt_info *);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user