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

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

Unified · Split

include/linux/fscrypt.h+25−21
@@ -56,10 +56,11 @@ struct fscrypt_name { · 55 unmodified lines
56struct fscrypt_operations {56struct 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
137extern void fscrypt_free_bounce_page(struct page *bounce_page);138extern void fscrypt_free_bounce_page(struct page *bounce_page);
138 139
139/* policy.c */140/* policy.c */
140extern int fscrypt_ioctl_set_policy(struct file *, const void __user *);141extern int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg);
141extern int fscrypt_ioctl_get_policy(struct file *, void __user *);142extern int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg);
142extern int fscrypt_ioctl_get_policy_ex(struct file *, void __user *);143extern int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg);
143extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg);144extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg);
144extern int fscrypt_has_permitted_context(struct inode *, struct inode *);145extern int fscrypt_has_permitted_context(struct inode *parent,
145extern int fscrypt_inherit_context(struct inode *, struct inode *,146 struct inode *child);
146 void *, bool);147extern int fscrypt_inherit_context(struct inode *parent, struct inode *child,
148 void *fs_data, bool preload);
149
147/* keyring.c */150/* keyring.c */
148extern void fscrypt_sb_free(struct super_block *sb);151extern void fscrypt_sb_free(struct super_block *sb);
149extern int fscrypt_ioctl_add_key(struct file *filp, void __user *arg);152extern 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
153extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg);156extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg);
154 157
155/* keysetup.c */158/* keysetup.c */
156extern int fscrypt_get_encryption_info(struct inode *);159extern int fscrypt_get_encryption_info(struct inode *inode);
157extern void fscrypt_put_encryption_info(struct inode *);160extern void fscrypt_put_encryption_info(struct inode *inode);
158extern void fscrypt_free_inode(struct inode *);161extern void fscrypt_free_inode(struct inode *inode);
159extern int fscrypt_drop_inode(struct inode *inode);162extern int fscrypt_drop_inode(struct inode *inode);
160 163
161/* fname.c */164/* fname.c */
162extern int fscrypt_setup_filename(struct inode *, const struct qstr *,165extern 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
165static inline void fscrypt_free_filename(struct fscrypt_name *fname)168static 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
170extern int fscrypt_fname_alloc_buffer(const struct inode *, u32,173extern int fscrypt_fname_alloc_buffer(const struct inode *inode,
171 struct fscrypt_str *);174 u32 max_encrypted_len,
172extern void fscrypt_fname_free_buffer(struct fscrypt_str *);175 struct fscrypt_str *crypto_str);
176extern void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str);
173extern int 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,
@@ -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 */
183extern void fscrypt_decrypt_bio(struct bio *);187extern void fscrypt_decrypt_bio(struct bio *bio);
184extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t,188extern 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 */
188extern int fscrypt_file_open(struct inode *inode, struct file *filp);192extern int fscrypt_file_open(struct inode *inode, struct file *filp);