aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fscrypt_supp.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-10-09 12:15:43 -0700
committerTheodore Ts'o <tytso@mit.edu>2017-10-18 19:52:38 -0400
commit32c3cf028e747d1e9cf0679b16dcbe3794fe4853 (patch)
tree812ab8801463d63ae0f41ced67168817988b6b9f /include/linux/fscrypt_supp.h
parentfscrypt: new helper function - fscrypt_prepare_rename() (diff)
downloadlinux-dev-32c3cf028e747d1e9cf0679b16dcbe3794fe4853.tar.xz
linux-dev-32c3cf028e747d1e9cf0679b16dcbe3794fe4853.zip
fscrypt: new helper function - fscrypt_prepare_lookup()
Introduce a helper function which prepares to look up the given dentry in the given directory. If the directory is encrypted, it handles loading the directory's encryption key, setting the dentry's ->d_op to fscrypt_d_ops, and setting DCACHE_ENCRYPTED_WITH_KEY if the directory's encryption key is available. Note: once all filesystems switch over to this, we'll be able to move fscrypt_d_ops and fscrypt_set_encrypted_dentry() to fscrypt_private.h. Acked-by: Dave Chinner <dchinner@redhat.com> 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h
index 40f35073145f..2db5e9706f60 100644
--- a/include/linux/fscrypt_supp.h
+++ b/include/linux/fscrypt_supp.h
@@ -151,5 +151,6 @@ extern int __fscrypt_prepare_rename(struct inode *old_dir,
struct inode *new_dir,
struct dentry *new_dentry,
unsigned int flags);
+extern int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry);
#endif /* _LINUX_FSCRYPT_SUPP_H */