Skip to content

Commit

Permalink
fscrypt: trim down fscrypt.h includes
Browse files Browse the repository at this point in the history
fscrypt.h included way too many other headers, given that it is included
by filesystems both with and without encryption support.  Trim down the
includes list by moving the needed includes into more appropriate
places, and removing the unneeded ones.

Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
  • Loading branch information
ebiggers authored and tytso committed Jan 12, 2018
1 parent dcf0db9 commit a575784
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions fs/crypto/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/dcache.h>
#include <linux/namei.h>
#include <crypto/aes.h>
#include <crypto/skcipher.h>
#include "fscrypt_private.h"

static unsigned int num_prealloc_crypto_pages = 32;
Expand Down
1 change: 1 addition & 0 deletions fs/crypto/fname.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <linux/scatterlist.h>
#include <linux/ratelimit.h>
#include <crypto/skcipher.h>
#include "fscrypt_private.h"

static inline bool fscrypt_is_dot_dotdot(const struct qstr *str)
Expand Down
1 change: 1 addition & 0 deletions fs/crypto/keyinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/ratelimit.h>
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/skcipher.h>
#include "fscrypt_private.h"

static struct crypto_shash *essiv_hash_tfm;
Expand Down
6 changes: 0 additions & 6 deletions include/linux/fscrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@
#ifndef _LINUX_FSCRYPT_H
#define _LINUX_FSCRYPT_H

#include <linux/key.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/bio.h>
#include <linux/dcache.h>
#include <crypto/skcipher.h>
#include <uapi/linux/fs.h>

#define FS_CRYPTO_BLOCK_SIZE 16

Expand Down
3 changes: 3 additions & 0 deletions include/linux/fscrypt_supp.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#ifndef _LINUX_FSCRYPT_SUPP_H
#define _LINUX_FSCRYPT_SUPP_H

#include <linux/mm.h>
#include <linux/slab.h>

/*
* fscrypt superblock flags
*/
Expand Down

0 comments on commit a575784

Please sign in to comment.