fscrypt: move fscrypt_ctx declaration to fscrypt_supp.h
authorEric Biggers <ebiggers@google.com>
Fri, 5 Jan 2018 18:44:55 +0000 (10:44 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 8 Apr 2018 09:40:00 +0000 (02:40 -0700)
Filesystems only ever access 'struct fscrypt_ctx' through fscrypt
functions.  But when a filesystem is built without encryption support,
these functions are all stubbed out, so the declaration of fscrypt_ctx
is unneeded.  Therefore, move it from fscrypt.h to fscrypt_supp.h.

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

index c23b2f16129a1e4ee0f603db21bb60bb5ed02aa1..0f94d087a6d171202ffcb7af445729d59e9588bb 100644 (file)
 
 #define FS_CRYPTO_BLOCK_SIZE           16
 
+struct fscrypt_ctx;
 struct fscrypt_info;
 
-struct fscrypt_ctx {
-       union {
-               struct {
-                       struct page *bounce_page;       /* Ciphertext page */
-                       struct page *control_page;      /* Original page  */
-               } w;
-               struct {
-                       struct bio *bio;
-                       struct work_struct work;
-               } r;
-               struct list_head free_list;     /* Free list */
-       };
-       u8 flags;                               /* Flags */
-};
-
 /**
  * For encrypted symlinks, the ciphertext length is stored at the beginning
  * of the string in little-endian format.
index 33d641e27c18460ab952875d0283f4012292491c..fd6ee089ced0430b6d50963264779c4cb3873051 100644 (file)
 #ifndef _LINUX_FSCRYPT_SUPP_H
 #define _LINUX_FSCRYPT_SUPP_H
 
+struct fscrypt_ctx {
+       union {
+               struct {
+                       struct page *bounce_page;       /* Ciphertext page */
+                       struct page *control_page;      /* Original page  */
+               } w;
+               struct {
+                       struct bio *bio;
+                       struct work_struct work;
+               } r;
+               struct list_head free_list;     /* Free list */
+       };
+       u8 flags;                               /* Flags */
+};
+
 static inline bool fscrypt_has_encryption_key(const struct inode *inode)
 {
        return (inode->i_crypt_info != NULL);