aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fscrypt_supp.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-01-05 10:44:52 -0800
committerTheodore Ts'o <tytso@mit.edu>2018-01-11 22:06:17 -0500
commit3d463f28564618805713658c6aeb786fa23f420b (patch)
treeb6d983e16b740a065fcafb6f8f0a51f86f74e9ba /include/linux/fscrypt_supp.h
parentLinux 4.15-rc4 (diff)
downloadlinux-dev-3d463f28564618805713658c6aeb786fa23f420b.tar.xz
linux-dev-3d463f28564618805713658c6aeb786fa23f420b.zip
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/fscrypt_supp.h')
-rw-r--r--include/linux/fscrypt_supp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h
index cf9e9fc02f0a..79bb8beae018 100644
--- a/include/linux/fscrypt_supp.h
+++ b/include/linux/fscrypt_supp.h
@@ -11,6 +11,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);