mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
fscrypt: move fscrypt_has_encryption_key() to supp/notsupp headers
fscrypt_has_encryption_key() is already split into two versions depending on whether the filesystem is being built with encryption support or not. Move them into the appropriate headers. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
1291a0d504
commit
3d463f2856
3 changed files with 10 additions and 10 deletions
|
@ -129,11 +129,6 @@ static inline struct page *fscrypt_control_page(struct page *page)
|
||||||
return ((struct fscrypt_ctx *)page_private(page))->w.control_page;
|
return ((struct fscrypt_ctx *)page_private(page))->w.control_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool fscrypt_has_encryption_key(const struct inode *inode)
|
|
||||||
{
|
|
||||||
return (inode->i_crypt_info != NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#include <linux/fscrypt_supp.h>
|
#include <linux/fscrypt_supp.h>
|
||||||
|
|
||||||
#else /* !__FS_HAS_ENCRYPTION */
|
#else /* !__FS_HAS_ENCRYPTION */
|
||||||
|
@ -144,11 +139,6 @@ static inline struct page *fscrypt_control_page(struct page *page)
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool fscrypt_has_encryption_key(const struct inode *inode)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include <linux/fscrypt_notsupp.h>
|
#include <linux/fscrypt_notsupp.h>
|
||||||
#endif /* __FS_HAS_ENCRYPTION */
|
#endif /* __FS_HAS_ENCRYPTION */
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,11 @@
|
||||||
#ifndef _LINUX_FSCRYPT_NOTSUPP_H
|
#ifndef _LINUX_FSCRYPT_NOTSUPP_H
|
||||||
#define _LINUX_FSCRYPT_NOTSUPP_H
|
#define _LINUX_FSCRYPT_NOTSUPP_H
|
||||||
|
|
||||||
|
static inline bool fscrypt_has_encryption_key(const struct inode *inode)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* crypto.c */
|
/* crypto.c */
|
||||||
static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode,
|
static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode,
|
||||||
gfp_t gfp_flags)
|
gfp_t gfp_flags)
|
||||||
|
|
|
@ -11,6 +11,11 @@
|
||||||
#ifndef _LINUX_FSCRYPT_SUPP_H
|
#ifndef _LINUX_FSCRYPT_SUPP_H
|
||||||
#define _LINUX_FSCRYPT_SUPP_H
|
#define _LINUX_FSCRYPT_SUPP_H
|
||||||
|
|
||||||
|
static inline bool fscrypt_has_encryption_key(const struct inode *inode)
|
||||||
|
{
|
||||||
|
return (inode->i_crypt_info != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/* crypto.c */
|
/* crypto.c */
|
||||||
extern struct kmem_cache *fscrypt_info_cachep;
|
extern struct kmem_cache *fscrypt_info_cachep;
|
||||||
extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t);
|
extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue