Commit fe015a78 authored by Eric Biggers's avatar Eric Biggers

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.

Link: https://lore.kernel.org/r/20200511191358.53096-3-ebiggers@kernel.orgSigned-off-by: default avatarEric Biggers <ebiggers@google.com>
parent d2fe9754
...@@ -56,10 +56,11 @@ struct fscrypt_name { ...@@ -56,10 +56,11 @@ struct fscrypt_name {
struct fscrypt_operations { struct fscrypt_operations {
unsigned int flags; unsigned int flags;
const char *key_prefix; const char *key_prefix;
int (*get_context)(struct inode *, void *, size_t); int (*get_context)(struct inode *inode, void *ctx, size_t len);
int (*set_context)(struct inode *, const void *, size_t, void *); int (*set_context)(struct inode *inode, const void *ctx, size_t len,
bool (*dummy_context)(struct inode *); void *fs_data);
bool (*empty_dir)(struct inode *); bool (*dummy_context)(struct inode *inode);
bool (*empty_dir)(struct inode *inode);
unsigned int max_namelen; unsigned int max_namelen;
bool (*has_stable_inodes)(struct super_block *sb); bool (*has_stable_inodes)(struct super_block *sb);
void (*get_ino_and_lblk_bits)(struct super_block *sb, 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) ...@@ -137,13 +138,15 @@ static inline struct page *fscrypt_pagecache_page(struct page *bounce_page)
extern void fscrypt_free_bounce_page(struct page *bounce_page); extern void fscrypt_free_bounce_page(struct page *bounce_page);
/* policy.c */ /* policy.c */
extern int fscrypt_ioctl_set_policy(struct file *, const void __user *); extern int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg);
extern int fscrypt_ioctl_get_policy(struct file *, void __user *); extern int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg);
extern int fscrypt_ioctl_get_policy_ex(struct file *, void __user *); extern int fscrypt_ioctl_get_policy_ex(struct file *filp, void __user *arg);
extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg); extern int fscrypt_ioctl_get_nonce(struct file *filp, void __user *arg);
extern int fscrypt_has_permitted_context(struct inode *, struct inode *); extern int fscrypt_has_permitted_context(struct inode *parent,
extern int fscrypt_inherit_context(struct inode *, struct inode *, struct inode *child);
void *, bool); extern int fscrypt_inherit_context(struct inode *parent, struct inode *child,
void *fs_data, bool preload);
/* keyring.c */ /* keyring.c */
extern void fscrypt_sb_free(struct super_block *sb); extern void fscrypt_sb_free(struct super_block *sb);
extern int fscrypt_ioctl_add_key(struct file *filp, void __user *arg); 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, ...@@ -153,23 +156,24 @@ extern int fscrypt_ioctl_remove_key_all_users(struct file *filp,
extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg); extern int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg);
/* keysetup.c */ /* keysetup.c */
extern int fscrypt_get_encryption_info(struct inode *); extern int fscrypt_get_encryption_info(struct inode *inode);
extern void fscrypt_put_encryption_info(struct inode *); extern void fscrypt_put_encryption_info(struct inode *inode);
extern void fscrypt_free_inode(struct inode *); extern void fscrypt_free_inode(struct inode *inode);
extern int fscrypt_drop_inode(struct inode *inode); extern int fscrypt_drop_inode(struct inode *inode);
/* fname.c */ /* fname.c */
extern int fscrypt_setup_filename(struct inode *, const struct qstr *, extern int fscrypt_setup_filename(struct inode *inode, const struct qstr *iname,
int lookup, struct fscrypt_name *); int lookup, struct fscrypt_name *fname);
static inline void fscrypt_free_filename(struct fscrypt_name *fname) static inline void fscrypt_free_filename(struct fscrypt_name *fname)
{ {
kfree(fname->crypto_buf.name); kfree(fname->crypto_buf.name);
} }
extern int fscrypt_fname_alloc_buffer(const struct inode *, u32, extern int fscrypt_fname_alloc_buffer(const struct inode *inode,
struct fscrypt_str *); u32 max_encrypted_len,
extern void fscrypt_fname_free_buffer(struct fscrypt_str *); struct fscrypt_str *crypto_str);
extern void fscrypt_fname_free_buffer(struct fscrypt_str *crypto_str);
extern int fscrypt_fname_disk_to_usr(const struct inode *inode, extern int fscrypt_fname_disk_to_usr(const struct inode *inode,
u32 hash, u32 minor_hash, u32 hash, u32 minor_hash,
const struct fscrypt_str *iname, const struct fscrypt_str *iname,
...@@ -180,9 +184,9 @@ extern u64 fscrypt_fname_siphash(const struct inode *dir, ...@@ -180,9 +184,9 @@ extern u64 fscrypt_fname_siphash(const struct inode *dir,
const struct qstr *name); const struct qstr *name);
/* bio.c */ /* bio.c */
extern void fscrypt_decrypt_bio(struct bio *); extern void fscrypt_decrypt_bio(struct bio *bio);
extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t, extern int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
unsigned int); sector_t pblk, unsigned int len);
/* hooks.c */ /* hooks.c */
extern int fscrypt_file_open(struct inode *inode, struct file *filp); extern int fscrypt_file_open(struct inode *inode, struct file *filp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment