Name all the function parameters. 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 matches the checkpatch expectation.
Unified · Split
| @@ -56,10 +56,11 @@ struct fscrypt_name { · 55 unmodified lines | |||
| 56 | struct fscrypt_operations { | 56 | struct fscrypt_operations { |
| 57 | unsigned int flags; | 57 | unsigned int flags; |
| 58 | const char *key_prefix; | 58 | const char *key_prefix; |
| 59 | int (*get_context)(struct inode *, void *, size_t); | 59 | int (*get_context)(struct inode *inode, void *ctx, size_t len); |
| 60 | int (*set_context)(struct inode *, const void *, size_t, void *); | 60 | int (*set_context)(struct inode *inode, const void *ctx, size_t len, |
| 61 | bool (*dummy_context)(struct inode *); | 61 | void *fs_data); |
| 62 | bool (*empty_dir)(struct inode *); | 62 | bool (*dummy_context)(struct inode *inode); |
| 63 | bool (*empty_dir)(struct inode *inode); | ||
| 63 | unsigned int max_namelen; | 64 | unsigned int max_namelen; |
| 64 | bool (*has_stable_inodes)(struct super_block *sb); | 65 | bool (*has_stable_inodes)(struct super_block *sb); |
| 65 | void (*get_ino_and_lblk_bits)(struct super_block *sb, | 66 | void (*get_ino_and_lblk_bits)(struct super_block *sb, |
| @@ -137,13 +138,15 @@ static inline struct page *fscrypt_pagecache_page(struct page *bounce_page) · 71 unmodified lines | |||
| 137 | extern void fscrypt_free_bounce_page(struct page *bounce_page); | 138 | extern void fscrypt_free_bounce_page(struct page *bounce_page); |
| 138 | 139 | ||
| 139 | /* policy.c */ | 140 | /* policy.c */ |
| 140 | extern int fscrypt_ioctl_set_policy(struct file *, const void __user *); | 141 | extern int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg); |
| 141 | extern int fscrypt_ioctl_get_policy(struct file *, void __user *); | 142 | extern int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg); |
| 142 | extern int fscrypt_ioctl_get_policy_ex(struct file *, void __user *); | 143 | extern int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg); |
| 143 | extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg); | 144 | extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg); |
| 144 | extern int fscrypt_has_permitted_context(struct inode *, struct inode *); | 145 | extern int fscrypt_has_permitted_context(struct inode *parent, |
| 145 | extern int fscrypt_inherit_context(struct inode *, struct inode *, | 146 | struct inode *child); |
| 146 | void *, bool); | 147 | extern int fscrypt_inherit_context(struct inode *parent, struct inode *child, |
| 148 | void *fs_data, bool preload); | ||
| 149 | |||
| 147 | /* keyring.c */ | 150 | /* keyring.c */ |
| 148 | extern void fscrypt_sb_free(struct super_block *sb); | 151 | extern void fscrypt_sb_free(struct super_block *sb); |
| 149 | extern int fscrypt_ioctl_add_key(struct file *filp, void __user *arg); | 152 | extern int fscrypt_ioctl_add_key(struct file *filp, void __user *arg); |
| @@ -153,23 +156,24 @@ extern int fscrypt_ioctl_remove_key_all_users(struct file *filp, · 3 unmodified lines | |||
| 153 | extern 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); |
| 154 | 157 | ||
| 155 | /* keysetup.c */ | 158 | /* keysetup.c */ |
| 156 | extern int fscrypt_get_encryption_info(struct inode *); | 159 | extern int fscrypt_get_encryption_info(struct inode *inode); |
| 157 | extern void fscrypt_put_encryption_info(struct inode *); | 160 | extern void fscrypt_put_encryption_info(struct inode *inode); |
| 158 | extern void fscrypt_free_inode(struct inode *); | 161 | extern void fscrypt_free_inode(struct inode *inode); |
| 159 | extern int fscrypt_drop_inode(struct inode *inode); | 162 | extern int fscrypt_drop_inode(struct inode *inode); |
| 160 | 163 | ||
| 161 | /* fname.c */ | 164 | /* fname.c */ |
| 162 | extern int fscrypt_setup_filename(struct inode *, const struct qstr *, | 165 | extern int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname, |
| 163 | int lookup, struct fscrypt_name *); | 166 | int lookup, struct fscrypt_name *fname); |
| 164 | 167 | ||
| 165 | static inline void fscrypt_free_filename(struct fscrypt_name *fname) | 168 | static inline void fscrypt_free_filename(struct fscrypt_name *fname) |
| 166 | { | 169 | { |
| 167 | kfree(fname->crypto_buf.name); | 170 | kfree(fname->crypto_buf.name); |
| 168 | } | 171 | } |
| 169 | 172 | ||
| 170 | extern int fscrypt_fname_alloc_buffer(const struct inode *, u32, | 173 | extern int fscrypt_fname_alloc_buffer(const struct inode *inode, |
| 171 | struct fscrypt_str *); | 174 | u32 max_encrypted_len, |
| 172 | extern void fscrypt_fname_free_buffer(struct fscrypt_str *); | 175 | struct fscrypt_str *crypto_str); |
| 176 | extern void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str); | ||
| 173 | extern 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, |
| @@ -180,9 +184,9 @@ extern u64 fscrypt_fname_siphash(const struct inode *dir, · 4 unmodified lines | |||
| 180 | const struct qstr *name); | 184 | const struct qstr *name); |
| 181 | 185 | ||
| 182 | /* bio.c */ | 186 | /* bio.c */ |
| 183 | extern void fscrypt_decrypt_bio(struct bio *); | 187 | extern void fscrypt_decrypt_bio(struct bio *bio); |
| 184 | extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t, | 188 | extern int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk, |
| 185 | unsigned int); | 189 | sector_t pblk, unsigned int len); |
| 186 | 190 | ||
| 187 | /* hooks.c */ | 191 | /* hooks.c */ |
| 188 | extern int fscrypt_file_open(struct inode *inode, struct file *filp); | 192 | extern int fscrypt_file_open(struct inode *inode, struct file *filp); |