Remove the unnecessary 'extern' keywords from function declarations. This makes it so that we don't have a mix of both styles, so it won't be ambiguous what to use in new fscrypt patches. This also makes the code shorter and matches the 'checkpatch --strict' expectation.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -108,22 +108,21 @@ static inline void fscrypt_handle_d_move(struct dentry *dentry) · 107 unmodified lines | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | /* crypto.c */ | 110 | /* crypto.c */ |
| 111 | extern void fscrypt_enqueue_decrypt_work(struct work_struct *); | 111 | void fscrypt_enqueue_decrypt_work(struct work_struct *); |
| 112 | 112 | ||
| 113 | extern struct page *fscrypt_encrypt_pagecache_blocks(struct page *page, | 113 | struct page *fscrypt_encrypt_pagecache_blocks(struct page *page, |
| 114 | unsigned int len, | 114 | unsigned int len, |
| 115 | unsigned int offs, | 115 | unsigned int offs, |
| 116 | gfp_t gfp_flags); | 116 | gfp_t gfp_flags); |
| 117 | extern int fscrypt_encrypt_block_inplace(const struct inode *inode, | 117 | int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page, |
| 118 | struct page *page, unsigned int len, | 118 | unsigned int len, unsigned int offs, |
| 119 | unsigned int offs, u64 lblk_num, | 119 | u64 lblk_num, gfp_t gfp_flags); |
| 120 | gfp_t gfp_flags); | 120 | |
| 121 | 121 | int fscrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len, | |
| 122 | extern int fscrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len, | 122 | unsigned int offs); |
| 123 | unsigned int offs); | 123 | int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page, |
| 124 | extern int fscrypt_decrypt_block_inplace(const struct inode *inode, | 124 | unsigned int len, unsigned int offs, |
| 125 | struct page *page, unsigned int len, | 125 | u64 lblk_num); |
| 126 | unsigned int offs, u64 lblk_num); | ||
| 127 | 126 | ||
| 128 | static inline bool fscrypt_is_bounce_page(struct page *page) | 127 | static inline bool fscrypt_is_bounce_page(struct page *page) |
| 129 | { | 128 | { |
| @@ -135,81 +134,74 @@ static inline struct page *fscrypt_pagecache_page(struct page *bounce_page) · 5 unmodified lines | |||
| 135 | return (struct page *)page_private(bounce_page); | 134 | return (struct page *)page_private(bounce_page); |
| 136 | } | 135 | } |
| 137 | 136 | ||
| 138 | extern void fscrypt_free_bounce_page(struct page *bounce_page); | 137 | void fscrypt_free_bounce_page(struct page *bounce_page); |
| 139 | 138 | ||
| 140 | /* policy.c */ | 139 | /* policy.c */ |
| 141 | extern int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg); | 140 | int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg); |
| 142 | extern int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg); | 141 | int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg); |
| 143 | extern int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg); | 142 | int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg); |
| 144 | extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg); | 143 | int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg); |
| 145 | extern int fscrypt_has_permitted_context(struct inode *parent, | 144 | int fscrypt_has_permitted_context(struct inode *parent, struct inode *child); |
| 146 | struct inode *child); | 145 | int fscrypt_inherit_context(struct inode *parent, struct inode *child, |
| 147 | extern int fscrypt_inherit_context(struct inode *parent, struct inode *child, | 146 | void *fs_data, bool preload); |
| 148 | void *fs_data, bool preload); | ||
| 149 | 147 | ||
| 150 | /* keyring.c */ | 148 | /* keyring.c */ |
| 151 | extern void fscrypt_sb_free(struct super_block *sb); | 149 | void fscrypt_sb_free(struct super_block *sb); |
| 152 | extern int fscrypt_ioctl_add_key(struct file *filp, void __user *arg); | 150 | int fscrypt_ioctl_add_key(struct file *filp, void __user *arg); |
| 153 | extern int fscrypt_ioctl_remove_key(struct file *filp, void __user *arg); | 151 | int fscrypt_ioctl_remove_key(struct file *filp, void __user *arg); |
| 154 | extern int fscrypt_ioctl_remove_key_all_users(struct file *filp, | 152 | int fscrypt_ioctl_remove_key_all_users(struct file *filp, void __user *arg); |
| 155 | void __user *arg); | 153 | int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg); |
| 156 | extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg); | ||
| 157 | 154 | ||
| 158 | /* keysetup.c */ | 155 | /* keysetup.c */ |
| 159 | extern int fscrypt_get_encryption_info(struct inode *inode); | 156 | int fscrypt_get_encryption_info(struct inode *inode); |
| 160 | extern void fscrypt_put_encryption_info(struct inode *inode); | 157 | void fscrypt_put_encryption_info(struct inode *inode); |
| 161 | extern void fscrypt_free_inode(struct inode *inode); | 158 | void fscrypt_free_inode(struct inode *inode); |
| 162 | extern int fscrypt_drop_inode(struct inode *inode); | 159 | int fscrypt_drop_inode(struct inode *inode); |
| 163 | 160 | ||
| 164 | /* fname.c */ | 161 | /* fname.c */ |
| 165 | extern int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname, | 162 | int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname, |
| 166 | int lookup, struct fscrypt_name *fname); | 163 | int lookup, struct fscrypt_name *fname); |
| 167 | 164 | ||
| 168 | static inline void fscrypt_free_filename(struct fscrypt_name *fname) | 165 | static inline void fscrypt_free_filename(struct fscrypt_name *fname) |
| 169 | { | 166 | { |
| 170 | kfree(fname->crypto_buf.name); | 167 | kfree(fname->crypto_buf.name); |
| 171 | } | 168 | } |
| 172 | 169 | ||
| 173 | extern int fscrypt_fname_alloc_buffer(const struct inode *inode, | 170 | int fscrypt_fname_alloc_buffer(const struct inode *inode, u32 max_encrypted_len, |
| 174 | u32 max_encrypted_len, | 171 | struct fscrypt_str *crypto_str); |
| 175 | struct fscrypt_str *crypto_str); | 172 | void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str); |
| 176 | extern void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str); | 173 | int fscrypt_fname_disk_to_usr(const struct inode *inode, |
| 177 | extern int fscrypt_fname_disk_to_usr(const struct inode *inode, | 174 | u32 hash, u32 minor_hash, |
| 178 | u32 hash, u32 minor_hash, | 175 | const struct fscrypt_str *iname, |
| 179 | const struct fscrypt_str *iname, | 176 | struct fscrypt_str *oname); |
| 180 | struct fscrypt_str *oname); | 177 | bool fscrypt_match_name(const struct fscrypt_name *fname, |
| 181 | extern bool fscrypt_match_name(const struct fscrypt_name *fname, | 178 | const u8 *de_name, u32 de_name_len); |
| 182 | const u8 *de_name, u32 de_name_len); | 179 | u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name); |
| 183 | extern u64 fscrypt_fname_siphash(const struct inode *dir, | ||
| 184 | const struct qstr *name); | ||
| 185 | 180 | ||
| 186 | /* bio.c */ | 181 | /* bio.c */ |
| 187 | extern void fscrypt_decrypt_bio(struct bio *bio); | 182 | void fscrypt_decrypt_bio(struct bio *bio); |
| 188 | extern int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, | 183 | int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, |
| 189 | sector_t pblk, unsigned int len); | 184 | sector_t pblk, unsigned int len); |
| 190 | 185 | ||
| 191 | /* hooks.c */ | 186 | /* hooks.c */ |
| 192 | extern int fscrypt_file_open(struct inode *inode, struct file *filp); | 187 | int fscrypt_file_open(struct inode *inode, struct file *filp); |
| 193 | extern int __fscrypt_prepare_link(struct inode *inode, struct inode *dir, | 188 | int __fscrypt_prepare_link(struct inode *inode, struct inode *dir, |
| 194 | struct dentry *dentry); | 189 | struct dentry *dentry); |
| 195 | extern int __fscrypt_prepare_rename(struct inode *old_dir, | 190 | int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, |
| 196 | struct dentry *old_dentry, | 191 | struct inode *new_dir, struct dentry *new_dentry, |
| 197 | struct inode *new_dir, | 192 | unsigned int flags); |
| 198 | struct dentry *new_dentry, | 193 | int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry, |
| 199 | unsigned int flags); | 194 | struct fscrypt_name *fname); |
| 200 | extern int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry, | 195 | int fscrypt_prepare_setflags(struct inode *inode, |
| 201 | struct fscrypt_name *fname); | 196 | unsigned int oldflags, unsigned int flags); |
| 202 | extern int fscrypt_prepare_setflags(struct inode *inode, | 197 | int __fscrypt_prepare_symlink(struct inode *dir, unsigned int len, |
| 203 | unsigned int oldflags, unsigned int flags); | 198 | unsigned int max_len, |
| 204 | extern int __fscrypt_prepare_symlink(struct inode *dir, unsigned int len, | 199 | struct fscrypt_str *disk_link); |
| 205 | unsigned int max_len, | 200 | int __fscrypt_encrypt_symlink(struct inode *inode, const char *target, |
| 206 | struct fscrypt_str *disk_link); | 201 | unsigned int len, struct fscrypt_str *disk_link); |
| 207 | extern int __fscrypt_encrypt_symlink(struct inode *inode, const char *target, | 202 | const char *fscrypt_get_symlink(struct inode *inode, const void *caddr, |
| 208 | unsigned int len, | 203 | unsigned int max_size, |
| 209 | struct fscrypt_str *disk_link); | 204 | struct delayed_call *done); |
| 210 | extern const char *fscrypt_get_symlink(struct inode *inode, const void *caddr, | ||
| 211 | unsigned int max_size, | ||
| 212 | struct delayed_call *done); | ||
| 213 | static inline void fscrypt_set_ops(struct super_block *sb, | 205 | static inline void fscrypt_set_ops(struct super_block *sb, |
| 214 | const struct fscrypt_operations *s_cop) | 206 | const struct fscrypt_operations *s_cop) |
| 215 | { | 207 | { |