summaryrefslogtreecommitdiffstats
path: root/include/linux/fscrypt_supp.h
diff options
context:
space:
mode:
authorEric Biggers2017-10-09 21:15:41 +0200
committerTheodore Ts'o2017-10-19 01:52:38 +0200
commit0ea87a9644ebb5c9a3b100585d10533366de3269 (patch)
tree3934cd8c3a6f16ecbabd3b2909dba12bfde6b4ce /include/linux/fscrypt_supp.h
parentfscrypt: new helper function - fscrypt_file_open() (diff)
downloadkernel-qcow2-linux-0ea87a9644ebb5c9a3b100585d10533366de3269.tar.gz
kernel-qcow2-linux-0ea87a9644ebb5c9a3b100585d10533366de3269.tar.xz
kernel-qcow2-linux-0ea87a9644ebb5c9a3b100585d10533366de3269.zip
fscrypt: new helper function - fscrypt_prepare_link()
Introduce a helper function which prepares to link an inode into a possibly-encrypted directory. It handles setting up the target directory's encryption key, then verifying that the link won't violate the constraint that all files in an encrypted directory tree use the same encryption policy. 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 fd2f6decaee4..80706283da75 100644
--- a/include/linux/fscrypt_supp.h
+++ b/include/linux/fscrypt_supp.h
@@ -145,5 +145,6 @@ extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t,
/* hooks.c */
extern int fscrypt_file_open(struct inode *inode, struct file *filp);
+extern int __fscrypt_prepare_link(struct inode *inode, struct inode *dir);
#endif /* _LINUX_FSCRYPT_SUPP_H */