fscrypt: clean up after fscrypt_prepare_lookup() conversions
authorEric Biggers <ebiggers@google.com>
Mon, 30 Apr 2018 22:51:36 +0000 (15:51 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 20 May 2018 20:20:59 +0000 (16:20 -0400)
Now that all filesystems have been converted to use
fscrypt_prepare_lookup(), we can remove the fscrypt_set_d_op() and
fscrypt_set_encrypted_dentry() functions as well as un-export
fscrypt_d_ops.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h
include/linux/fscrypt_notsupp.h
include/linux/fscrypt_supp.h

index 984e190f9b8943ca76c3f396736ae7f436beec99..dd3a0164eec482191422f6306d5eaa2b724a45c7 100644 (file)
@@ -353,7 +353,6 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags)
 const struct dentry_operations fscrypt_d_ops = {
        .d_revalidate = fscrypt_d_revalidate,
 };
-EXPORT_SYMBOL(fscrypt_d_ops);
 
 void fscrypt_restore_control_page(struct page *page)
 {
index ad6722bae8b7499b8128224cef436898043afc3d..fb96e493167b133c842a158607894cacfe52d4e5 100644 (file)
@@ -106,6 +106,7 @@ extern int fscrypt_do_page_crypto(const struct inode *inode,
                                  gfp_t gfp_flags);
 extern struct page *fscrypt_alloc_bounce_page(struct fscrypt_ctx *ctx,
                                              gfp_t gfp_flags);
+extern const struct dentry_operations fscrypt_d_ops;
 
 /* fname.c */
 extern int fname_encrypt(struct inode *inode, const struct qstr *iname,
index 44b50c04bae9a3ad31cb319635c683dfa1899c6b..25b6492de6e532652e47a397c44909fc6f23cff4 100644 (file)
@@ -64,16 +64,6 @@ static inline void fscrypt_restore_control_page(struct page *page)
        return;
 }
 
-static inline void fscrypt_set_d_op(struct dentry *dentry)
-{
-       return;
-}
-
-static inline void fscrypt_set_encrypted_dentry(struct dentry *dentry)
-{
-       return;
-}
-
 /* policy.c */
 static inline int fscrypt_ioctl_set_policy(struct file *filp,
                                           const void __user *arg)
index 477a7a6504d214aa80b994106943d7ef6878ee34..c9c2cc26bc62e250a86bdc38d599c523a9684091 100644 (file)
@@ -74,20 +74,6 @@ static inline struct page *fscrypt_control_page(struct page *page)
 
 extern void fscrypt_restore_control_page(struct page *);
 
-extern const struct dentry_operations fscrypt_d_ops;
-
-static inline void fscrypt_set_d_op(struct dentry *dentry)
-{
-       d_set_d_op(dentry, &fscrypt_d_ops);
-}
-
-static inline void fscrypt_set_encrypted_dentry(struct dentry *dentry)
-{
-       spin_lock(&dentry->d_lock);
-       dentry->d_flags |= DCACHE_ENCRYPTED_WITH_KEY;
-       spin_unlock(&dentry->d_lock);
-}
-
 /* policy.c */
 extern int fscrypt_ioctl_set_policy(struct file *, const void __user *);
 extern int fscrypt_ioctl_get_policy(struct file *, void __user *);