History

fscrypt: name all function parameters

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.

Eric Biggers committed 6 years ago

Commit fe015a71 parent d2fe9751 file · +25 −21Browse files

Unified · Split

include/linux/fscrypt.h+25−21
@@ -56,10 +56,11 @@ struct fscrypt_name { · 55 unmodified lines
5656 struct fscrypt_operations {
5757 unsigned int flags;
5858 const char *key_prefix;
59− int (*get_context)(struct inode *, void *, size_t);
60− int (*set_context)(struct inode *, const void *, size_t, void *);
61− bool (*dummy_context)(struct inode *);
62− bool (*empty_dir)(struct inode *);
59+ int (*get_context)(struct inode *inode, void *ctx, size_t len);
60+ int (*set_context)(struct inode *inode, const void *ctx, size_t len,
61+ void *fs_data);
62+ bool (*dummy_context)(struct inode *inode);
63+ bool (*empty_dir)(struct inode *inode);
6364 unsigned int max_namelen;
6465 bool (*has_stable_inodes)(struct super_block *sb);
6566 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
137138 extern void fscrypt_free_bounce_page(struct page *bounce_page);
138139
139140 /* policy.c */
140−extern int fscrypt_ioctl_set_policy(struct file *, const void __user *);
141−extern int fscrypt_ioctl_get_policy(struct file *, void __user *);
142−extern int fscrypt_ioctl_get_policy_ex(struct file *, void __user *);
141+extern 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);
143+extern int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg);
143144 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_inherit_context(struct inode *, struct inode *,
146− void *, bool);
145+extern int fscrypt_has_permitted_context(struct inode *parent,
146+ struct inode *child);
147+extern int fscrypt_inherit_context(struct inode *parent, struct inode *child,
148+ void *fs_data, bool preload);
149+
147150 /* keyring.c */
148151 extern void fscrypt_sb_free(struct super_block *sb);
149152 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
153156 extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg);
154157
155158 /* keysetup.c */
156−extern int fscrypt_get_encryption_info(struct inode *);
157−extern void fscrypt_put_encryption_info(struct inode *);
158−extern void fscrypt_free_inode(struct inode *);
159+extern int fscrypt_get_encryption_info(struct inode *inode);
160+extern void fscrypt_put_encryption_info(struct inode *inode);
161+extern void fscrypt_free_inode(struct inode *inode);
159162 extern int fscrypt_drop_inode(struct inode *inode);
160163
161164 /* fname.c */
162−extern int fscrypt_setup_filename(struct inode *, const struct qstr *,
163− int lookup, struct fscrypt_name *);
165+extern int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname,
166+ int lookup, struct fscrypt_name *fname);
164167
165168 static inline void fscrypt_free_filename(struct fscrypt_name *fname)
166169 {
167170 kfree(fname->crypto_buf.name);
168171 }
169172
170−extern int fscrypt_fname_alloc_buffer(const struct inode *, u32,
171− struct fscrypt_str *);
172−extern void fscrypt_fname_free_buffer(struct fscrypt_str *);
173+extern int fscrypt_fname_alloc_buffer(const struct inode *inode,
174+ u32 max_encrypted_len,
175+ struct fscrypt_str *crypto_str);
176+extern void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str);
173177 extern int fscrypt_fname_disk_to_usr(const struct inode *inode,
174178 u32 hash, u32 minor_hash,
175179 const struct fscrypt_str *iname,
@@ -180,9 +184,9 @@ extern u64 fscrypt_fname_siphash(const struct inode *dir, · 4 unmodified lines
180184 const struct qstr *name);
181185
182186 /* bio.c */
183−extern void fscrypt_decrypt_bio(struct bio *);
184−extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t,
185− unsigned int);
187+extern void fscrypt_decrypt_bio(struct bio *bio);
188+extern int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
189+ sector_t pblk, unsigned int len);
186190
187191 /* hooks.c */
188192 extern int fscrypt_file_open(struct inode *inode, struct file *filp);