mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Closes #10470
This commit is contained in:
committed by
Brian Behlendorf
parent
1fa5c7af33
commit
65c7cc49bf
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 *))
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user