History

fscrypt: remove unnecessary extern keywords

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.

Eric Biggers committed 6 years ago

Commit 60700901 parent fe015a72 files · +105 −117Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/fscrypt.h+65−73
@@ -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 */
111extern void fscrypt_enqueue_decrypt_work(struct work_struct *);111void fscrypt_enqueue_decrypt_work(struct work_struct *);
112 112
113extern struct page *fscrypt_encrypt_pagecache_blocks(struct page *page,113struct 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);
117extern int fscrypt_encrypt_block_inplace(const struct inode *inode,117int 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 121int fscrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len,
122extern int fscrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len,122 unsigned int offs);
123 unsigned int offs);123int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
124extern 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
128static inline bool fscrypt_is_bounce_page(struct page *page)127static 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
138extern void fscrypt_free_bounce_page(struct page *bounce_page);137void fscrypt_free_bounce_page(struct page *bounce_page);
139 138
140/* policy.c */139/* policy.c */
141extern int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg);140int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg);
142extern int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg);141int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg);
143extern int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg);142int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg);
144extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg);143int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg);
145extern int fscrypt_has_permitted_context(struct inode *parent,144int fscrypt_has_permitted_context(struct inode *parent, struct inode *child);
146 struct inode *child);145int fscrypt_inherit_context(struct inode *parent, struct inode *child,
147extern 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 */
151extern void fscrypt_sb_free(struct super_block *sb);149void fscrypt_sb_free(struct super_block *sb);
152extern int fscrypt_ioctl_add_key(struct file *filp, void __user *arg);150int fscrypt_ioctl_add_key(struct file *filp, void __user *arg);
153extern int fscrypt_ioctl_remove_key(struct file *filp, void __user *arg);151int fscrypt_ioctl_remove_key(struct file *filp, void __user *arg);
154extern int fscrypt_ioctl_remove_key_all_users(struct file *filp,152int fscrypt_ioctl_remove_key_all_users(struct file *filp, void __user *arg);
155 void __user *arg);153int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg);
156extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg);
157 154
158/* keysetup.c */155/* keysetup.c */
159extern int fscrypt_get_encryption_info(struct inode *inode);156int fscrypt_get_encryption_info(struct inode *inode);
160extern void fscrypt_put_encryption_info(struct inode *inode);157void fscrypt_put_encryption_info(struct inode *inode);
161extern void fscrypt_free_inode(struct inode *inode);158void fscrypt_free_inode(struct inode *inode);
162extern int fscrypt_drop_inode(struct inode *inode);159int fscrypt_drop_inode(struct inode *inode);
163 160
164/* fname.c */161/* fname.c */
165extern int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname,162int 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
168static inline void fscrypt_free_filename(struct fscrypt_name *fname)165static 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
173extern int fscrypt_fname_alloc_buffer(const struct inode *inode,170int 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);172void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str);
176extern void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str);173int fscrypt_fname_disk_to_usr(const struct inode *inode,
177extern 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);177bool fscrypt_match_name(const struct fscrypt_name *fname,
181extern 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);179u64 fscrypt_fname_siphash(const struct inode *dir, const struct qstr *name);
183extern u64 fscrypt_fname_siphash(const struct inode *dir,
184 const struct qstr *name);
185 180
186/* bio.c */181/* bio.c */
187extern void fscrypt_decrypt_bio(struct bio *bio);182void fscrypt_decrypt_bio(struct bio *bio);
188extern int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,183int 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 */
192extern int fscrypt_file_open(struct inode *inode, struct file *filp);187int fscrypt_file_open(struct inode *inode, struct file *filp);
193extern int __fscrypt_prepare_link(struct inode *inode, struct inode *dir,188int __fscrypt_prepare_link(struct inode *inode, struct inode *dir,
194 struct dentry *dentry);189 struct dentry *dentry);
195extern int __fscrypt_prepare_rename(struct inode *old_dir,190int __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,193int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry,
199 unsigned int flags);194 struct fscrypt_name *fname);
200extern int __fscrypt_prepare_lookup(struct inode *dir, struct dentry *dentry,195int fscrypt_prepare_setflags(struct inode *inode,
201 struct fscrypt_name *fname);196 unsigned int oldflags, unsigned int flags);
202extern int fscrypt_prepare_setflags(struct inode *inode,197int __fscrypt_prepare_symlink(struct inode *dir, unsigned int len,
203 unsigned int oldflags, unsigned int flags);198 unsigned int max_len,
204extern int __fscrypt_prepare_symlink(struct inode *dir, unsigned int len,199 struct fscrypt_str *disk_link);
205 unsigned int max_len,200int __fscrypt_encrypt_symlink(struct inode *inode, const char *target,
206 struct fscrypt_str *disk_link);201 unsigned int len, struct fscrypt_str *disk_link);
207extern int __fscrypt_encrypt_symlink(struct inode *inode, const char *target,202const 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);
210extern const char *fscrypt_get_symlink(struct inode *inode, const void *caddr,
211 unsigned int max_size,
212 struct delayed_call *done);
213static inline void fscrypt_set_ops(struct super_block *sb,205static 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{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t