diff options
author | Eric Biggers <ebiggers@google.com> | 2018-01-05 13:44:57 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-01-11 22:06:18 -0500 |
commit | bdd234764769a267794f275ce96706a466d376d7 (patch) | |
tree | 9d87f1fb58be4cf5b357b6b274de1f4cbdaab817 | |
parent | 1493651b53b4811960b6220a340929074b58a55b (diff) |
fscrypt: move fscrypt_operations declaration to fscrypt_supp.h
Filesystems now only define their fscrypt_operations when they are
compiled with encryption support, so move the fscrypt_operations
declaration from fscrypt.h to fscrypt_supp.h.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | include/linux/fscrypt.h | 18 | ||||
-rw-r--r-- | include/linux/fscrypt_supp.h | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index b671a4eef47f..33b95a91f720 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h | |||
@@ -54,24 +54,6 @@ struct fscrypt_name { | |||
54 | #define fname_name(p) ((p)->disk_name.name) | 54 | #define fname_name(p) ((p)->disk_name.name) |
55 | #define fname_len(p) ((p)->disk_name.len) | 55 | #define fname_len(p) ((p)->disk_name.len) |
56 | 56 | ||
57 | /* | ||
58 | * fscrypt superblock flags | ||
59 | */ | ||
60 | #define FS_CFLG_OWN_PAGES (1U << 1) | ||
61 | |||
62 | /* | ||
63 | * crypto opertions for filesystems | ||
64 | */ | ||
65 | struct fscrypt_operations { | ||
66 | unsigned int flags; | ||
67 | const char *key_prefix; | ||
68 | int (*get_context)(struct inode *, void *, size_t); | ||
69 | int (*set_context)(struct inode *, const void *, size_t, void *); | ||
70 | bool (*dummy_context)(struct inode *); | ||
71 | bool (*empty_dir)(struct inode *); | ||
72 | unsigned (*max_namelen)(struct inode *); | ||
73 | }; | ||
74 | |||
75 | /* Maximum value for the third parameter of fscrypt_operations.set_context(). */ | 57 | /* Maximum value for the third parameter of fscrypt_operations.set_context(). */ |
76 | #define FSCRYPT_SET_CONTEXT_MAX_SIZE 28 | 58 | #define FSCRYPT_SET_CONTEXT_MAX_SIZE 28 |
77 | 59 | ||
diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index e7dfa2974906..ce61caf26f40 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h | |||
@@ -11,6 +11,24 @@ | |||
11 | #ifndef _LINUX_FSCRYPT_SUPP_H | 11 | #ifndef _LINUX_FSCRYPT_SUPP_H |
12 | #define _LINUX_FSCRYPT_SUPP_H | 12 | #define _LINUX_FSCRYPT_SUPP_H |
13 | 13 | ||
14 | /* | ||
15 | * fscrypt superblock flags | ||
16 | */ | ||
17 | #define FS_CFLG_OWN_PAGES (1U << 1) | ||
18 | |||
19 | /* | ||
20 | * crypto operations for filesystems | ||
21 | */ | ||
22 | struct fscrypt_operations { | ||
23 | unsigned int flags; | ||
24 | const char *key_prefix; | ||
25 | int (*get_context)(struct inode *, void *, size_t); | ||
26 | int (*set_context)(struct inode *, const void *, size_t, void *); | ||
27 | bool (*dummy_context)(struct inode *); | ||
28 | bool (*empty_dir)(struct inode *); | ||
29 | unsigned (*max_namelen)(struct inode *); | ||
30 | }; | ||
31 | |||
14 | struct fscrypt_ctx { | 32 | struct fscrypt_ctx { |
15 | union { | 33 | union { |
16 | struct { | 34 | struct { |