diff options
| author | Eric Biggers <ebiggers@google.com> | 2018-01-05 10:44:52 -0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-04-08 02:07:57 -0700 |
| commit | 3a2c7917782292956a32d4e1df8dc3dbecc01b25 (patch) | |
| tree | 027a75eb7daa02ac326ad00ba3268f0a42cd99c2 /include/linux | |
| parent | 39ed8376d611d2a211079be6a2ac08715f5a58c4 (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fscrypt.h | 10 | ||||
| -rw-r--r-- | include/linux/fscrypt_notsupp.h | 5 | ||||
| -rw-r--r-- | include/linux/fscrypt_supp.h | 5 |
3 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 8641e56b8f8a..1e2343b46262 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -125,11 +125,6 @@ static inline struct page *fscrypt_control_page(struct page *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> #else /* !__FS_HAS_ENCRYPTION */ @@ -140,11 +135,6 @@ static inline struct page *fscrypt_control_page(struct page *page) return ERR_PTR(-EINVAL); } -static inline bool fscrypt_has_encryption_key(const struct inode *inode) -{ - return 0; -} - #include <linux/fscrypt_notsupp.h> #endif /* __FS_HAS_ENCRYPTION */ diff --git a/include/linux/fscrypt_notsupp.h b/include/linux/fscrypt_notsupp.h index c4c6bf2c390e..f8685c25b7b3 100644 --- a/include/linux/fscrypt_notsupp.h +++ b/include/linux/fscrypt_notsupp.h @@ -13,6 +13,11 @@ #ifndef _LINUX_FSCRYPT_NOTSUPP_H #define _LINUX_FSCRYPT_NOTSUPP_H +static inline bool fscrypt_has_encryption_key(const struct inode *inode) +{ + return false; +} + /* crypto.c */ static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode, gfp_t gfp_flags) diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index 2db5e9706f60..1fb73a6892b1 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h @@ -10,6 +10,11 @@ #ifndef _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 */ extern struct kmem_cache *fscrypt_info_cachep; extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t); |
