diff options
author | Arvind Sankar <[email protected]> | 2020-06-15 14:30:37 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-06-18 12:20:38 -0700 |
commit | 65c7cc49bfcf49d38fc84552a17d7e8a3268e58e (patch) | |
tree | 4740b896f8b5fc114ae9a96c6581776799ffeb3a /module/os/linux | |
parent | 1fa5c7af3314b4c556bd86e3a49e3497a5ed72ed (diff) |
Mark functions as static
Mark functions used only in the same translation unit as static. This
only includes functions that do not have a prototype in a header file
either.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10470
Diffstat (limited to 'module/os/linux')
-rw-r--r-- | module/os/linux/spl/spl-generic.c | 2 | ||||
-rw-r--r-- | module/os/linux/zfs/spa_stats.c | 2 | ||||
-rw-r--r-- | module/os/linux/zfs/zfs_acl.c | 6 | ||||
-rw-r--r-- | module/os/linux/zfs/zfs_vfsops.c | 4 | ||||
-rw-r--r-- | module/os/linux/zfs/zfs_vnops.c | 2 | ||||
-rw-r--r-- | module/os/linux/zfs/zfs_znode.c | 6 | ||||
-rw-r--r-- | module/os/linux/zfs/zpl_file.c | 2 | ||||
-rw-r--r-- | module/os/linux/zfs/zpl_inode.c | 6 | ||||
-rw-r--r-- | module/os/linux/zfs/zpl_xattr.c | 5 | ||||
-rw-r--r-- | module/os/linux/zfs/zvol_os.c | 2 |
10 files changed, 20 insertions, 17 deletions
diff --git a/module/os/linux/spl/spl-generic.c b/module/os/linux/spl/spl-generic.c index c55ebf7c5..837447239 100644 --- a/module/os/linux/spl/spl-generic.c +++ b/module/os/linux/spl/spl-generic.c @@ -543,7 +543,7 @@ spl_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) #endif } -int +static int spl_getattr(struct file *filp, struct kstat *stat) { int rc; diff --git a/module/os/linux/zfs/spa_stats.c b/module/os/linux/zfs/spa_stats.c index 2ec32da46..86cefa6dd 100644 --- a/module/os/linux/zfs/spa_stats.c +++ b/module/os/linux/zfs/spa_stats.c @@ -952,7 +952,7 @@ spa_iostats_trim_add(spa_t *spa, trim_type_t type, } } -int +static int spa_iostats_update(kstat_t *ksp, int rw) { if (rw == KSTAT_WRITE) { diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c index ff963b0a5..87547eb54 100644 --- a/module/os/linux/zfs/zfs_acl.c +++ b/module/os/linux/zfs/zfs_acl.c @@ -648,7 +648,7 @@ zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt, * While processing the ACL each ACE will be validated for correctness. * ACE FUIDs will be created later. */ -int +static int zfs_copy_ace_2_fuid(zfsvfs_t *zfsvfs, umode_t obj_mode, zfs_acl_t *aclp, void *datap, zfs_ace_t *z_acl, uint64_t aclcnt, size_t *size, zfs_fuid_info_t **fuidp, cred_t *cr) @@ -1189,7 +1189,7 @@ typedef struct trivial_acl { uint32_t everyone; /* allow mask matching mode */ } trivial_acl_t; -void +static void acl_trivial_access_masks(mode_t mode, boolean_t isdir, trivial_acl_t *masks) { uint32_t read_mask = ACE_READ_DATA; @@ -1262,7 +1262,7 @@ acl_trivial_access_masks(mode_t mode, boolean_t isdir, trivial_acl_t *masks) * have read_acl denied, and write_owner/write_acl/write_attributes * can only be owner@ entry. */ -int +static int ace_trivial_common(void *acep, int aclcnt, uint64_t (*walk)(void *, uint64_t, int aclcnt, uint16_t *, uint16_t *, uint32_t *)) diff --git a/module/os/linux/zfs/zfs_vfsops.c b/module/os/linux/zfs/zfs_vfsops.c index 9561960bc..db831bf54 100644 --- a/module/os/linux/zfs/zfs_vfsops.c +++ b/module/os/linux/zfs/zfs_vfsops.c @@ -971,7 +971,7 @@ zfs_set_fuid_feature(zfsvfs_t *zfsvfs) zfsvfs->z_use_sa = USE_SA(zfsvfs->z_version, zfsvfs->z_os); } -void +static void zfs_unregister_callbacks(zfsvfs_t *zfsvfs) { objset_t *os = zfsvfs->z_os; @@ -1159,7 +1159,7 @@ zfs_statvfs(struct inode *ip, struct kstatfs *statp) return (err); } -int +static int zfs_root(zfsvfs_t *zfsvfs, struct inode **ipp) { znode_t *rootzp; diff --git a/module/os/linux/zfs/zfs_vnops.c b/module/os/linux/zfs/zfs_vnops.c index cf5d406a2..acf3aca44 100644 --- a/module/os/linux/zfs/zfs_vnops.c +++ b/module/os/linux/zfs/zfs_vnops.c @@ -1041,7 +1041,7 @@ zfs_zrele_async(znode_t *zp) } /* ARGSUSED */ -void +static void zfs_get_done(zgd_t *zgd, int error) { znode_t *zp = zgd->zgd_private; diff --git a/module/os/linux/zfs/zfs_znode.c b/module/os/linux/zfs/zfs_znode.c index 45f19785d..504dc76f9 100644 --- a/module/os/linux/zfs/zfs_znode.c +++ b/module/os/linux/zfs/zfs_znode.c @@ -249,7 +249,7 @@ zfs_znode_hold_compare(const void *a, const void *b) return (TREE_CMP(zh_a->zh_obj, zh_b->zh_obj)); } -boolean_t +static boolean_t __maybe_unused zfs_znode_held(zfsvfs_t *zfsvfs, uint64_t obj) { znode_hold_t *zh, search; @@ -451,7 +451,7 @@ zfs_inode_set_ops(zfsvfs_t *zfsvfs, struct inode *ip) } } -void +static void zfs_set_inode_flags(znode_t *zp, struct inode *ip) { /* @@ -2013,7 +2013,7 @@ zfs_grab_sa_handle(objset_t *osp, uint64_t obj, sa_handle_t **hdlp, return (0); } -void +static void zfs_release_sa_handle(sa_handle_t *hdl, dmu_buf_t *db, void *tag) { sa_handle_destroy(hdl); diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c index c26ed5d09..51e189a87 100644 --- a/module/os/linux/zfs/zpl_file.c +++ b/module/os/linux/zfs/zpl_file.c @@ -651,7 +651,7 @@ zpl_readpages(struct file *filp, struct address_space *mapping, (filler_t *)zpl_readpage, filp)); } -int +static int zpl_putpage(struct page *pp, struct writeback_control *wbc, void *data) { struct address_space *mapping = data; diff --git a/module/os/linux/zfs/zpl_inode.c b/module/os/linux/zfs/zpl_inode.c index c1b582574..f3b97a220 100644 --- a/module/os/linux/zfs/zpl_inode.c +++ b/module/os/linux/zfs/zpl_inode.c @@ -518,7 +518,7 @@ zpl_get_link_common(struct dentry *dentry, struct inode *ip, char **link) } #if defined(HAVE_GET_LINK_DELAYED) -const char * +static const char * zpl_get_link(struct dentry *dentry, struct inode *inode, struct delayed_call *done) { @@ -537,7 +537,7 @@ zpl_get_link(struct dentry *dentry, struct inode *inode, return (link); } #elif defined(HAVE_GET_LINK_COOKIE) -const char * +static const char * zpl_get_link(struct dentry *dentry, struct inode *inode, void **cookie) { char *link = NULL; @@ -553,7 +553,7 @@ zpl_get_link(struct dentry *dentry, struct inode *inode, void **cookie) return (*cookie = link); } #elif defined(HAVE_FOLLOW_LINK_COOKIE) -const char * +static const char * zpl_follow_link(struct dentry *dentry, void **cookie) { char *link = NULL; diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c index 956aed528..fa3c03640 100644 --- a/module/os/linux/zfs/zpl_xattr.c +++ b/module/os/linux/zfs/zpl_xattr.c @@ -148,7 +148,7 @@ zpl_xattr_filldir(xattr_filldir_t *xf, const char *name, int name_len) * Read as many directory entry names as will fit in to the provided buffer, * or when no buffer is provided calculate the required buffer size. */ -int +static int zpl_xattr_readdir(struct inode *dxip, xattr_filldir_t *xf) { zap_cursor_t zc; @@ -920,6 +920,9 @@ xattr_handler_t zpl_xattr_security_handler = { * attribute implemented by filesystems in the kernel." - xattr(7) */ #ifdef CONFIG_FS_POSIX_ACL +#ifndef HAVE_SET_ACL +static +#endif int zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type) { diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index 3d820ce56..12d448094 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -640,7 +640,7 @@ zvol_revalidate_disk(struct gendisk *disk) return (0); } -int +static int zvol_update_volsize(zvol_state_t *zv, uint64_t volsize) { |