module: mark arguments used

Reviewed-by: Alejandro Colomar <alx.manpages@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13110
This commit is contained in:
наб 2022-02-16 02:38:43 +01:00 committed by Brian Behlendorf
parent 51c747de43
commit ef70eff198
25 changed files with 119 additions and 171 deletions

View File

@ -338,10 +338,10 @@ callb_generic_cpr(void *arg, int code)
* The generic callback function associated with kernel threads which * The generic callback function associated with kernel threads which
* are always considered safe. * are always considered safe.
*/ */
/* ARGSUSED */
boolean_t boolean_t
callb_generic_cpr_safe(void *arg, int code) callb_generic_cpr_safe(void *arg, int code)
{ {
(void) arg, (void) code;
return (B_TRUE); return (B_TRUE);
} }
/* /*

View File

@ -40,19 +40,17 @@ __FBSDID("$FreeBSD$");
#include <sys/kobj.h> #include <sys/kobj.h>
/*ARGSUSED*/
static void * static void *
zcalloc(void *opaque, uint_t items, uint_t size) zcalloc(void *opaque, uint_t items, uint_t size)
{ {
(void) opaque;
return (malloc((size_t)items*size, M_SOLARIS, M_NOWAIT)); return (malloc((size_t)items*size, M_SOLARIS, M_NOWAIT));
} }
/*ARGSUSED*/
static void static void
zcfree(void *opaque, void *ptr) zcfree(void *opaque, void *ptr)
{ {
(void) opaque;
free(ptr, M_SOLARIS); free(ptr, M_SOLARIS);
} }

View File

@ -144,10 +144,10 @@ zfs_ace_v0_set_who(void *acep, uint64_t who)
((zfs_oldace_t *)acep)->z_fuid = who; ((zfs_oldace_t *)acep)->z_fuid = who;
} }
/*ARGSUSED*/
static size_t static size_t
zfs_ace_v0_size(void *acep) zfs_ace_v0_size(void *acep)
{ {
(void) acep;
return (sizeof (zfs_oldace_t)); return (sizeof (zfs_oldace_t));
} }
@ -163,10 +163,10 @@ zfs_ace_v0_mask_off(void)
return (offsetof(zfs_oldace_t, z_access_mask)); return (offsetof(zfs_oldace_t, z_access_mask));
} }
/*ARGSUSED*/
static int static int
zfs_ace_v0_data(void *acep, void **datap) zfs_ace_v0_data(void *acep, void **datap)
{ {
(void) acep;
*datap = NULL; *datap = NULL;
return (0); return (0);
} }
@ -631,11 +631,11 @@ zfs_acl_next_ace(zfs_acl_t *aclp, void *start, uint64_t *who,
return (NULL); return (NULL);
} }
/*ARGSUSED*/
static uint64_t static uint64_t
zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt, zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt,
uint16_t *flags, uint16_t *type, uint32_t *mask) uint16_t *flags, uint16_t *type, uint32_t *mask)
{ {
(void) aclcnt;
zfs_acl_t *aclp = datap; zfs_acl_t *aclp = datap;
zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)(uintptr_t)cookie; zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)(uintptr_t)cookie;
uint64_t who; uint64_t who;
@ -1120,11 +1120,11 @@ done:
return (error); return (error);
} }
/*ARGSUSED*/
void void
zfs_acl_data_locator(void **dataptr, uint32_t *length, uint32_t buflen, zfs_acl_data_locator(void **dataptr, uint32_t *length, uint32_t buflen,
boolean_t start, void *userdata) boolean_t start, void *userdata)
{ {
(void) buflen;
zfs_acl_locator_cb_t *cb = (zfs_acl_locator_cb_t *)userdata; zfs_acl_locator_cb_t *cb = (zfs_acl_locator_cb_t *)userdata;
if (start) { if (start) {

View File

@ -456,10 +456,10 @@ zfsctl_common_open(struct vop_open_args *ap)
/* /*
* Common close routine. Nothing to do here. * Common close routine. Nothing to do here.
*/ */
/* ARGSUSED */
static int static int
zfsctl_common_close(struct vop_close_args *ap) zfsctl_common_close(struct vop_close_args *ap)
{ {
(void) ap;
return (0); return (0);
} }

View File

@ -397,7 +397,6 @@ zfs_is_readonly(zfsvfs_t *zfsvfs)
return (!!(zfsvfs->z_vfs->vfs_flag & VFS_RDONLY)); return (!!(zfsvfs->z_vfs->vfs_flag & VFS_RDONLY));
} }
/*ARGSUSED*/
static int static int
zfs_sync(vfs_t *vfsp, int waitfor) zfs_sync(vfs_t *vfsp, int waitfor)
{ {
@ -1310,7 +1309,6 @@ fetch_osname_options(char *name, bool *checkpointrewind)
} }
} }
/*ARGSUSED*/
static int static int
zfs_mount(vfs_t *vfsp) zfs_mount(vfs_t *vfsp)
{ {
@ -1641,7 +1639,6 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting)
return (0); return (0);
} }
/*ARGSUSED*/
static int static int
zfs_umount(vfs_t *vfsp, int fflag) zfs_umount(vfs_t *vfsp, int fflag)
{ {

View File

@ -220,11 +220,10 @@ typedef ulong_t cookie_t;
* ZFS_EXIT(zfsvfs); // finished in zfs * ZFS_EXIT(zfsvfs); // finished in zfs
* return (error); // done, report error * return (error); // done, report error
*/ */
/* ARGSUSED */
static int static int
zfs_open(vnode_t **vpp, int flag, cred_t *cr) zfs_open(vnode_t **vpp, int flag, cred_t *cr)
{ {
(void) cr;
znode_t *zp = VTOZ(*vpp); znode_t *zp = VTOZ(*vpp);
zfsvfs_t *zfsvfs = zp->z_zfsvfs; zfsvfs_t *zfsvfs = zp->z_zfsvfs;
@ -245,10 +244,10 @@ zfs_open(vnode_t **vpp, int flag, cred_t *cr)
return (0); return (0);
} }
/* ARGSUSED */
static int static int
zfs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr) zfs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr)
{ {
(void) offset, (void) cr;
znode_t *zp = VTOZ(vp); znode_t *zp = VTOZ(vp);
zfsvfs_t *zfsvfs = zp->z_zfsvfs; zfsvfs_t *zfsvfs = zp->z_zfsvfs;
@ -263,11 +262,11 @@ zfs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr)
return (0); return (0);
} }
/* ARGSUSED */
static int static int
zfs_ioctl(vnode_t *vp, ulong_t com, intptr_t data, int flag, cred_t *cred, zfs_ioctl(vnode_t *vp, ulong_t com, intptr_t data, int flag, cred_t *cred,
int *rvalp) int *rvalp)
{ {
(void) flag, (void) cred, (void) rvalp;
loff_t off; loff_t off;
int error; int error;
@ -764,7 +763,6 @@ zfs_lookup_lock(vnode_t *dvp, vnode_t *vp, const char *name, int lkflags)
* Timestamps: * Timestamps:
* NA * NA
*/ */
/* ARGSUSED */
static int static int
zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp, zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp,
struct componentname *cnp, int nameiop, cred_t *cr, int flags, struct componentname *cnp, int nameiop, cred_t *cr, int flags,
@ -1034,12 +1032,11 @@ zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp,
* dvp - ctime|mtime updated if new entry created * dvp - ctime|mtime updated if new entry created
* vp - ctime|mtime always, atime if new * vp - ctime|mtime always, atime if new
*/ */
/* ARGSUSED */
int int
zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, int mode, zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, int mode,
znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp) znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp)
{ {
(void) excl, (void) mode, (void) flag;
znode_t *zp; znode_t *zp;
zfsvfs_t *zfsvfs = dzp->z_zfsvfs; zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
zilog_t *zilog; zilog_t *zilog;
@ -1201,8 +1198,6 @@ out:
* dvp - ctime|mtime * dvp - ctime|mtime
* vp - ctime (if nlink > 0) * vp - ctime (if nlink > 0)
*/ */
/*ARGSUSED*/
static int static int
zfs_remove_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr) zfs_remove_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
{ {
@ -1390,11 +1385,11 @@ zfs_remove(znode_t *dzp, const char *name, cred_t *cr, int flags)
* dvp - ctime|mtime updated * dvp - ctime|mtime updated
* vp - ctime|mtime|atime updated * vp - ctime|mtime|atime updated
*/ */
/*ARGSUSED*/
int int
zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp, zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp,
cred_t *cr, int flags, vsecattr_t *vsecp) cred_t *cr, int flags, vsecattr_t *vsecp)
{ {
(void) flags, (void) vsecp;
znode_t *zp; znode_t *zp;
zfsvfs_t *zfsvfs = dzp->z_zfsvfs; zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
zilog_t *zilog; zilog_t *zilog;
@ -1567,7 +1562,6 @@ cache_vop_rmdir(struct vnode *dvp, struct vnode *vp)
* Timestamps: * Timestamps:
* dvp - ctime|mtime updated * dvp - ctime|mtime updated
*/ */
/*ARGSUSED*/
static int static int
zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr) zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
{ {
@ -1668,7 +1662,6 @@ zfs_rmdir(znode_t *dzp, const char *name, znode_t *cwd, cred_t *cr, int flags)
* We use 0 for '.', and 1 for '..'. If this is the root of the filesystem, * We use 0 for '.', and 1 for '..'. If this is the root of the filesystem,
* we use the offset 2 for the '.zfs' directory. * we use the offset 2 for the '.zfs' directory.
*/ */
/* ARGSUSED */
static int static int
zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp,
int *ncookies, cookie_t **cookies) int *ncookies, cookie_t **cookies)
@ -1994,7 +1987,6 @@ update:
* *
* RETURN: 0 (always succeeds). * RETURN: 0 (always succeeds).
*/ */
/* ARGSUSED */
static int static int
zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
{ {
@ -2208,7 +2200,6 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
* Timestamps: * Timestamps:
* vp - ctime updated, mtime updated if size changed. * vp - ctime updated, mtime updated if size changed.
*/ */
/* ARGSUSED */
int int
zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr) zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr)
{ {
@ -3191,7 +3182,6 @@ zfs_do_rename_impl(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
* Timestamps: * Timestamps:
* sdvp,tdvp - ctime|mtime updated * sdvp,tdvp - ctime|mtime updated
*/ */
/*ARGSUSED*/
static int static int
zfs_do_rename(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp, zfs_do_rename(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
vnode_t *tdvp, vnode_t **tvpp, struct componentname *tcnp, vnode_t *tdvp, vnode_t **tvpp, struct componentname *tcnp,
@ -3514,11 +3504,11 @@ fail:
* Timestamps: * Timestamps:
* dvp - ctime|mtime updated * dvp - ctime|mtime updated
*/ */
/*ARGSUSED*/
int int
zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap, zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
const char *link, znode_t **zpp, cred_t *cr, int flags) const char *link, znode_t **zpp, cred_t *cr, int flags)
{ {
(void) flags;
znode_t *zp; znode_t *zp;
dmu_tx_t *tx; dmu_tx_t *tx;
zfsvfs_t *zfsvfs = dzp->z_zfsvfs; zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
@ -3653,10 +3643,10 @@ zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
* Timestamps: * Timestamps:
* vp - atime updated * vp - atime updated
*/ */
/* ARGSUSED */
static int static int
zfs_readlink(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, caller_context_t *ct) zfs_readlink(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, caller_context_t *ct)
{ {
(void) cr, (void) ct;
znode_t *zp = VTOZ(vp); znode_t *zp = VTOZ(vp);
zfsvfs_t *zfsvfs = zp->z_zfsvfs; zfsvfs_t *zfsvfs = zp->z_zfsvfs;
int error; int error;
@ -3690,11 +3680,11 @@ zfs_readlink(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, caller_context_t *ct)
* tdvp - ctime|mtime updated * tdvp - ctime|mtime updated
* svp - ctime updated * svp - ctime updated
*/ */
/* ARGSUSED */
int int
zfs_link(znode_t *tdzp, znode_t *szp, const char *name, cred_t *cr, zfs_link(znode_t *tdzp, znode_t *szp, const char *name, cred_t *cr,
int flags) int flags)
{ {
(void) flags;
znode_t *tzp; znode_t *tzp;
zfsvfs_t *zfsvfs = tdzp->z_zfsvfs; zfsvfs_t *zfsvfs = tdzp->z_zfsvfs;
zilog_t *zilog; zilog_t *zilog;
@ -3839,11 +3829,11 @@ zfs_link(znode_t *tdzp, znode_t *szp, const char *name, cred_t *cr,
* Timestamps: * Timestamps:
* ip - ctime|mtime updated * ip - ctime|mtime updated
*/ */
/* ARGSUSED */
int int
zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag, zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
offset_t offset, cred_t *cr) offset_t offset, cred_t *cr)
{ {
(void) offset;
zfsvfs_t *zfsvfs = ZTOZSB(zp); zfsvfs_t *zfsvfs = ZTOZSB(zp);
uint64_t off, len; uint64_t off, len;
int error; int error;
@ -3890,10 +3880,10 @@ zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
return (error); return (error);
} }
/*ARGSUSED*/
static void static void
zfs_inactive(vnode_t *vp, cred_t *cr, caller_context_t *ct) zfs_inactive(vnode_t *vp, cred_t *cr, caller_context_t *ct)
{ {
(void) cr, (void) ct;
znode_t *zp = VTOZ(vp); znode_t *zp = VTOZ(vp);
zfsvfs_t *zfsvfs = zp->z_zfsvfs; zfsvfs_t *zfsvfs = zp->z_zfsvfs;
int error; int error;
@ -3942,10 +3932,10 @@ _Static_assert(sizeof (struct zfid_short) <= sizeof (struct fid),
_Static_assert(sizeof (struct zfid_long) <= sizeof (struct fid), _Static_assert(sizeof (struct zfid_long) <= sizeof (struct fid),
"struct zfid_long bigger than struct fid"); "struct zfid_long bigger than struct fid");
/*ARGSUSED*/
static int static int
zfs_fid(vnode_t *vp, fid_t *fidp, caller_context_t *ct) zfs_fid(vnode_t *vp, fid_t *fidp, caller_context_t *ct)
{ {
(void) ct;
znode_t *zp = VTOZ(vp); znode_t *zp = VTOZ(vp);
zfsvfs_t *zfsvfs = zp->z_zfsvfs; zfsvfs_t *zfsvfs = zp->z_zfsvfs;
uint32_t gen; uint32_t gen;

View File

@ -156,10 +156,10 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
return (0); return (0);
} }
/*ARGSUSED*/
static void static void
zfs_znode_cache_destructor(void *buf, void *arg) zfs_znode_cache_destructor(void *buf, void *arg)
{ {
(void) arg;
znode_t *zp = buf; znode_t *zp = buf;
ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs)); ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs));

View File

@ -203,7 +203,6 @@ static int zvol_geom_bio_getattr(struct bio *bp);
* GEOM mode implementation * GEOM mode implementation
*/ */
/*ARGSUSED*/
static int static int
zvol_geom_open(struct g_provider *pp, int flag, int count) zvol_geom_open(struct g_provider *pp, int flag, int count)
{ {
@ -336,10 +335,10 @@ out_locked:
return (err); return (err);
} }
/*ARGSUSED*/
static int static int
zvol_geom_close(struct g_provider *pp, int flag, int count) zvol_geom_close(struct g_provider *pp, int flag, int count)
{ {
(void) flag;
zvol_state_t *zv; zvol_state_t *zv;
boolean_t drop_suspend = B_TRUE; boolean_t drop_suspend = B_TRUE;
int new_open_count; int new_open_count;

View File

@ -144,10 +144,10 @@ zfs_ace_v0_set_who(void *acep, uint64_t who)
((zfs_oldace_t *)acep)->z_fuid = who; ((zfs_oldace_t *)acep)->z_fuid = who;
} }
/*ARGSUSED*/
static size_t static size_t
zfs_ace_v0_size(void *acep) zfs_ace_v0_size(void *acep)
{ {
(void) acep;
return (sizeof (zfs_oldace_t)); return (sizeof (zfs_oldace_t));
} }
@ -163,10 +163,10 @@ zfs_ace_v0_mask_off(void)
return (offsetof(zfs_oldace_t, z_access_mask)); return (offsetof(zfs_oldace_t, z_access_mask));
} }
/*ARGSUSED*/
static int static int
zfs_ace_v0_data(void *acep, void **datap) zfs_ace_v0_data(void *acep, void **datap)
{ {
(void) acep;
*datap = NULL; *datap = NULL;
return (0); return (0);
} }
@ -629,11 +629,11 @@ zfs_acl_next_ace(zfs_acl_t *aclp, void *start, uint64_t *who,
return (NULL); return (NULL);
} }
/*ARGSUSED*/
static uint64_t static uint64_t
zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt, zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt,
uint16_t *flags, uint16_t *type, uint32_t *mask) uint16_t *flags, uint16_t *type, uint32_t *mask)
{ {
(void) aclcnt;
zfs_acl_t *aclp = datap; zfs_acl_t *aclp = datap;
zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)(uintptr_t)cookie; zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)(uintptr_t)cookie;
uint64_t who; uint64_t who;
@ -1130,11 +1130,11 @@ done:
return (error); return (error);
} }
/*ARGSUSED*/
void void
zfs_acl_data_locator(void **dataptr, uint32_t *length, uint32_t buflen, zfs_acl_data_locator(void **dataptr, uint32_t *length, uint32_t buflen,
boolean_t start, void *userdata) boolean_t start, void *userdata)
{ {
(void) buflen;
zfs_acl_locator_cb_t *cb = (zfs_acl_locator_cb_t *)userdata; zfs_acl_locator_cb_t *cb = (zfs_acl_locator_cb_t *)userdata;
if (start) { if (start) {

View File

@ -256,10 +256,10 @@ zfs_is_readonly(zfsvfs_t *zfsvfs)
return (!!(zfsvfs->z_sb->s_flags & SB_RDONLY)); return (!!(zfsvfs->z_sb->s_flags & SB_RDONLY));
} }
/*ARGSUSED*/
int int
zfs_sync(struct super_block *sb, int wait, cred_t *cr) zfs_sync(struct super_block *sb, int wait, cred_t *cr)
{ {
(void) cr;
zfsvfs_t *zfsvfs = sb->s_fs_info; zfsvfs_t *zfsvfs = sb->s_fs_info;
/* /*
@ -1600,7 +1600,6 @@ zfs_preumount(struct super_block *sb)
* Called once all other unmount released tear down has occurred. * Called once all other unmount released tear down has occurred.
* It is our responsibility to release any remaining infrastructure. * It is our responsibility to release any remaining infrastructure.
*/ */
/*ARGSUSED*/
int int
zfs_umount(struct super_block *sb) zfs_umount(struct super_block *sb)
{ {
@ -2128,7 +2127,6 @@ zfs_get_vfs_flag_unmounted(objset_t *os)
return (unmounted); return (unmounted);
} }
/*ARGSUSED*/
void void
zfsvfs_update_fromname(const char *oldname, const char *newname) zfsvfs_update_fromname(const char *oldname, const char *newname)
{ {
@ -2136,6 +2134,7 @@ zfsvfs_update_fromname(const char *oldname, const char *newname)
* We don't need to do anything here, the devname is always current by * We don't need to do anything here, the devname is always current by
* virtue of zfsvfs->z_sb->s_op->show_devname. * virtue of zfsvfs->z_sb->s_op->show_devname.
*/ */
(void) oldname, (void) newname;
} }
void void

View File

@ -174,11 +174,10 @@
* ZFS_EXIT(zfsvfs); // finished in zfs * ZFS_EXIT(zfsvfs); // finished in zfs
* return (error); // done, report error * return (error); // done, report error
*/ */
/* ARGSUSED */
int int
zfs_open(struct inode *ip, int mode, int flag, cred_t *cr) zfs_open(struct inode *ip, int mode, int flag, cred_t *cr)
{ {
(void) cr;
znode_t *zp = ITOZ(ip); znode_t *zp = ITOZ(ip);
zfsvfs_t *zfsvfs = ITOZSB(ip); zfsvfs_t *zfsvfs = ITOZSB(ip);
@ -200,10 +199,10 @@ zfs_open(struct inode *ip, int mode, int flag, cred_t *cr)
return (0); return (0);
} }
/* ARGSUSED */
int int
zfs_close(struct inode *ip, int flag, cred_t *cr) zfs_close(struct inode *ip, int flag, cred_t *cr)
{ {
(void) cr;
znode_t *zp = ITOZ(ip); znode_t *zp = ITOZ(ip);
zfsvfs_t *zfsvfs = ITOZSB(ip); zfsvfs_t *zfsvfs = ITOZSB(ip);
@ -415,7 +414,6 @@ zfs_zrele_async(znode_t *zp)
* Timestamps: * Timestamps:
* NA * NA
*/ */
/* ARGSUSED */
int int
zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags, cred_t *cr, zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags, cred_t *cr,
int *direntflags, pathname_t *realpnp) int *direntflags, pathname_t *realpnp)
@ -535,8 +533,6 @@ zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags, cred_t *cr,
* dzp - ctime|mtime updated if new entry created * dzp - ctime|mtime updated if new entry created
* zp - ctime|mtime always, atime if new * zp - ctime|mtime always, atime if new
*/ */
/* ARGSUSED */
int int
zfs_create(znode_t *dzp, char *name, vattr_t *vap, int excl, zfs_create(znode_t *dzp, char *name, vattr_t *vap, int excl,
int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp) int mode, znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp)
@ -782,11 +778,11 @@ out:
return (error); return (error);
} }
/* ARGSUSED */
int int
zfs_tmpfile(struct inode *dip, vattr_t *vap, int excl, zfs_tmpfile(struct inode *dip, vattr_t *vap, int excl,
int mode, struct inode **ipp, cred_t *cr, int flag, vsecattr_t *vsecp) int mode, struct inode **ipp, cred_t *cr, int flag, vsecattr_t *vsecp)
{ {
(void) excl, (void) mode, (void) flag;
znode_t *zp = NULL, *dzp = ITOZ(dip); znode_t *zp = NULL, *dzp = ITOZ(dip);
zfsvfs_t *zfsvfs = ITOZSB(dip); zfsvfs_t *zfsvfs = ITOZSB(dip);
objset_t *os; objset_t *os;
@ -920,7 +916,6 @@ out:
static uint64_t null_xattr = 0; static uint64_t null_xattr = 0;
/*ARGSUSED*/
int int
zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags) zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags)
{ {
@ -1160,7 +1155,6 @@ out:
* dzp - ctime|mtime updated * dzp - ctime|mtime updated
* zpp - ctime|mtime|atime updated * zpp - ctime|mtime|atime updated
*/ */
/*ARGSUSED*/
int int
zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap, znode_t **zpp, zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap, znode_t **zpp,
cred_t *cr, int flags, vsecattr_t *vsecp) cred_t *cr, int flags, vsecattr_t *vsecp)
@ -1349,7 +1343,6 @@ out:
* Timestamps: * Timestamps:
* dzp - ctime|mtime updated * dzp - ctime|mtime updated
*/ */
/*ARGSUSED*/
int int
zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd, cred_t *cr, zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd, cred_t *cr,
int flags) int flags)
@ -1482,10 +1475,10 @@ out:
* We use 0 for '.', and 1 for '..'. If this is the root of the filesystem, * We use 0 for '.', and 1 for '..'. If this is the root of the filesystem,
* we use the offset 2 for the '.zfs' directory. * we use the offset 2 for the '.zfs' directory.
*/ */
/* ARGSUSED */
int int
zfs_readdir(struct inode *ip, zpl_dir_context_t *ctx, cred_t *cr) zfs_readdir(struct inode *ip, zpl_dir_context_t *ctx, cred_t *cr)
{ {
(void) cr;
znode_t *zp = ITOZ(ip); znode_t *zp = ITOZ(ip);
zfsvfs_t *zfsvfs = ITOZSB(ip); zfsvfs_t *zfsvfs = ITOZSB(ip);
objset_t *os; objset_t *os;
@ -1635,7 +1628,6 @@ out:
* *
* RETURN: 0 (always succeeds) * RETURN: 0 (always succeeds)
*/ */
/* ARGSUSED */
int int
zfs_getattr_fast(struct user_namespace *user_ns, struct inode *ip, zfs_getattr_fast(struct user_namespace *user_ns, struct inode *ip,
struct kstat *sp) struct kstat *sp)
@ -1823,7 +1815,6 @@ next:
* Timestamps: * Timestamps:
* ip - ctime updated, mtime updated if size changed. * ip - ctime updated, mtime updated if size changed.
*/ */
/* ARGSUSED */
int int
zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr) zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr)
{ {
@ -2652,7 +2643,6 @@ zfs_rename_lock(znode_t *szp, znode_t *tdzp, znode_t *sdzp, zfs_zlock_t **zlpp)
* Timestamps: * Timestamps:
* sdzp,tdzp - ctime|mtime updated * sdzp,tdzp - ctime|mtime updated
*/ */
/*ARGSUSED*/
int int
zfs_rename(znode_t *sdzp, char *snm, znode_t *tdzp, char *tnm, zfs_rename(znode_t *sdzp, char *snm, znode_t *tdzp, char *tnm,
cred_t *cr, int flags) cred_t *cr, int flags)
@ -3020,7 +3010,6 @@ out:
* Timestamps: * Timestamps:
* dip - ctime|mtime updated * dip - ctime|mtime updated
*/ */
/*ARGSUSED*/
int int
zfs_symlink(znode_t *dzp, char *name, vattr_t *vap, char *link, zfs_symlink(znode_t *dzp, char *name, vattr_t *vap, char *link,
znode_t **zpp, cred_t *cr, int flags) znode_t **zpp, cred_t *cr, int flags)
@ -3188,10 +3177,10 @@ top:
* Timestamps: * Timestamps:
* ip - atime updated * ip - atime updated
*/ */
/* ARGSUSED */
int int
zfs_readlink(struct inode *ip, zfs_uio_t *uio, cred_t *cr) zfs_readlink(struct inode *ip, zfs_uio_t *uio, cred_t *cr)
{ {
(void) cr;
znode_t *zp = ITOZ(ip); znode_t *zp = ITOZ(ip);
zfsvfs_t *zfsvfs = ITOZSB(ip); zfsvfs_t *zfsvfs = ITOZSB(ip);
int error; int error;
@ -3227,7 +3216,6 @@ zfs_readlink(struct inode *ip, zfs_uio_t *uio, cred_t *cr)
* tdzp - ctime|mtime updated * tdzp - ctime|mtime updated
* szp - ctime updated * szp - ctime updated
*/ */
/* ARGSUSED */
int int
zfs_link(znode_t *tdzp, znode_t *szp, char *name, cred_t *cr, zfs_link(znode_t *tdzp, znode_t *szp, char *name, cred_t *cr,
int flags) int flags)
@ -3430,7 +3418,6 @@ zfs_putpage_commit_cb(void *arg)
* Timestamps: * Timestamps:
* ip - ctime|mtime updated * ip - ctime|mtime updated
*/ */
/* ARGSUSED */
int int
zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc) zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc)
{ {
@ -3687,7 +3674,6 @@ out:
return (error); return (error);
} }
/*ARGSUSED*/
void void
zfs_inactive(struct inode *ip) zfs_inactive(struct inode *ip)
{ {
@ -3791,7 +3777,6 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages)
* Timestamps: * Timestamps:
* vp - atime updated * vp - atime updated
*/ */
/* ARGSUSED */
int int
zfs_getpage(struct inode *ip, struct page *pl[], int nr_pages) zfs_getpage(struct inode *ip, struct page *pl[], int nr_pages)
{ {
@ -3825,11 +3810,11 @@ zfs_getpage(struct inode *ip, struct page *pl[], int nr_pages)
* RETURN: 0 if success * RETURN: 0 if success
* error code if failure * error code if failure
*/ */
/*ARGSUSED*/
int int
zfs_map(struct inode *ip, offset_t off, caddr_t *addrp, size_t len, zfs_map(struct inode *ip, offset_t off, caddr_t *addrp, size_t len,
unsigned long vm_flags) unsigned long vm_flags)
{ {
(void) addrp;
znode_t *zp = ITOZ(ip); znode_t *zp = ITOZ(ip);
zfsvfs_t *zfsvfs = ITOZSB(ip); zfsvfs_t *zfsvfs = ITOZSB(ip);
@ -3875,11 +3860,11 @@ zfs_map(struct inode *ip, offset_t off, caddr_t *addrp, size_t len,
* Timestamps: * Timestamps:
* zp - ctime|mtime updated * zp - ctime|mtime updated
*/ */
/* ARGSUSED */
int int
zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag, zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
offset_t offset, cred_t *cr) offset_t offset, cred_t *cr)
{ {
(void) offset;
zfsvfs_t *zfsvfs = ZTOZSB(zp); zfsvfs_t *zfsvfs = ZTOZSB(zp);
uint64_t off, len; uint64_t off, len;
int error; int error;
@ -3926,7 +3911,6 @@ zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
return (error); return (error);
} }
/*ARGSUSED*/
int int
zfs_fid(struct inode *ip, fid_t *fidp) zfs_fid(struct inode *ip, fid_t *fidp)
{ {

View File

@ -113,10 +113,10 @@ zfs_rangelock_cb(zfs_locked_range_t *new, void *arg)
} }
} }
/*ARGSUSED*/
static int static int
zfs_znode_cache_constructor(void *buf, void *arg, int kmflags) zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
{ {
(void) arg, (void) kmflags;
znode_t *zp = buf; znode_t *zp = buf;
inode_init_once(ZTOI(zp)); inode_init_once(ZTOI(zp));
@ -137,10 +137,10 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
return (0); return (0);
} }
/*ARGSUSED*/
static void static void
zfs_znode_cache_destructor(void *buf, void *arg) zfs_znode_cache_destructor(void *buf, void *arg)
{ {
(void) arg;
znode_t *zp = buf; znode_t *zp = buf;
ASSERT(!list_link_active(&zp->z_link_node)); ASSERT(!list_link_active(&zp->z_link_node));
@ -159,6 +159,7 @@ zfs_znode_cache_destructor(void *buf, void *arg)
static int static int
zfs_znode_hold_cache_constructor(void *buf, void *arg, int kmflags) zfs_znode_hold_cache_constructor(void *buf, void *arg, int kmflags)
{ {
(void) arg, (void) kmflags;
znode_hold_t *zh = buf; znode_hold_t *zh = buf;
mutex_init(&zh->zh_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&zh->zh_lock, NULL, MUTEX_DEFAULT, NULL);
@ -171,6 +172,7 @@ zfs_znode_hold_cache_constructor(void *buf, void *arg, int kmflags)
static void static void
zfs_znode_hold_cache_destructor(void *buf, void *arg) zfs_znode_hold_cache_destructor(void *buf, void *arg)
{ {
(void) arg;
znode_hold_t *zh = buf; znode_hold_t *zh = buf;
mutex_destroy(&zh->zh_lock); mutex_destroy(&zh->zh_lock);

View File

@ -36,7 +36,6 @@
/* /*
* Common open routine. Disallow any write access. * Common open routine. Disallow any write access.
*/ */
/* ARGSUSED */
static int static int
zpl_common_open(struct inode *ip, struct file *filp) zpl_common_open(struct inode *ip, struct file *filp)
{ {
@ -99,7 +98,6 @@ zpl_root_readdir(struct file *filp, void *dirent, filldir_t filldir)
/* /*
* Get root directory attributes. * Get root directory attributes.
*/ */
/* ARGSUSED */
static int static int
#ifdef HAVE_USERNS_IOPS_GETATTR #ifdef HAVE_USERNS_IOPS_GETATTR
zpl_root_getattr_impl(struct user_namespace *user_ns, zpl_root_getattr_impl(struct user_namespace *user_ns,
@ -110,10 +108,15 @@ zpl_root_getattr_impl(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags) u32 request_mask, unsigned int query_flags)
#endif #endif
{ {
(void) request_mask, (void) query_flags;
struct inode *ip = path->dentry->d_inode; struct inode *ip = path->dentry->d_inode;
#if defined(HAVE_GENERIC_FILLATTR_USERNS) && defined(HAVE_USERNS_IOPS_GETATTR) #ifdef HAVE_USERNS_IOPS_GETATTR
#ifdef HAVE_GENERIC_FILLATTR_USERNS
generic_fillattr(user_ns, ip, stat); generic_fillattr(user_ns, ip, stat);
#else
(void) user_ns;
#endif
#else #else
generic_fillattr(ip, stat); generic_fillattr(ip, stat);
#endif #endif
@ -382,7 +385,6 @@ zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode)
/* /*
* Get snapshot directory attributes. * Get snapshot directory attributes.
*/ */
/* ARGSUSED */
static int static int
#ifdef HAVE_USERNS_IOPS_GETATTR #ifdef HAVE_USERNS_IOPS_GETATTR
zpl_snapdir_getattr_impl(struct user_namespace *user_ns, zpl_snapdir_getattr_impl(struct user_namespace *user_ns,
@ -393,12 +395,17 @@ zpl_snapdir_getattr_impl(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags) u32 request_mask, unsigned int query_flags)
#endif #endif
{ {
(void) request_mask, (void) query_flags;
struct inode *ip = path->dentry->d_inode; struct inode *ip = path->dentry->d_inode;
zfsvfs_t *zfsvfs = ITOZSB(ip); zfsvfs_t *zfsvfs = ITOZSB(ip);
ZPL_ENTER(zfsvfs); ZPL_ENTER(zfsvfs);
#if defined(HAVE_GENERIC_FILLATTR_USERNS) && defined(HAVE_USERNS_IOPS_GETATTR) #ifdef HAVE_USERNS_IOPS_GETATTR
#ifdef HAVE_GENERIC_FILLATTR_USERNS
generic_fillattr(user_ns, ip, stat); generic_fillattr(user_ns, ip, stat);
#else
(void) user_ns;
#endif
#else #else
generic_fillattr(ip, stat); generic_fillattr(ip, stat);
#endif #endif
@ -524,7 +531,6 @@ zpl_shares_readdir(struct file *filp, void *dirent, filldir_t filldir)
} }
#endif /* !HAVE_VFS_ITERATE && !HAVE_VFS_ITERATE_SHARED */ #endif /* !HAVE_VFS_ITERATE && !HAVE_VFS_ITERATE_SHARED */
/* ARGSUSED */
static int static int
#ifdef HAVE_USERNS_IOPS_GETATTR #ifdef HAVE_USERNS_IOPS_GETATTR
zpl_shares_getattr_impl(struct user_namespace *user_ns, zpl_shares_getattr_impl(struct user_namespace *user_ns,
@ -535,6 +541,7 @@ zpl_shares_getattr_impl(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags) u32 request_mask, unsigned int query_flags)
#endif #endif
{ {
(void) request_mask, (void) query_flags;
struct inode *ip = path->dentry->d_inode; struct inode *ip = path->dentry->d_inode;
zfsvfs_t *zfsvfs = ITOZSB(ip); zfsvfs_t *zfsvfs = ITOZSB(ip);
znode_t *dzp; znode_t *dzp;
@ -543,8 +550,12 @@ zpl_shares_getattr_impl(const struct path *path, struct kstat *stat,
ZPL_ENTER(zfsvfs); ZPL_ENTER(zfsvfs);
if (zfsvfs->z_shares_dir == 0) { if (zfsvfs->z_shares_dir == 0) {
#if defined(HAVE_GENERIC_FILLATTR_USERNS) && defined(HAVE_USERNS_IOPS_GETATTR) #ifdef HAVE_USERNS_IOPS_GETATTR
#ifdef HAVE_GENERIC_FILLATTR_USERNS
generic_fillattr(user_ns, path->dentry->d_inode, stat); generic_fillattr(user_ns, path->dentry->d_inode, stat);
#else
(void) user_ns;
#endif
#else #else
generic_fillattr(path->dentry->d_inode, stat); generic_fillattr(path->dentry->d_inode, stat);
#endif #endif
@ -556,8 +567,12 @@ zpl_shares_getattr_impl(const struct path *path, struct kstat *stat,
error = -zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp); error = -zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp);
if (error == 0) { if (error == 0) {
#if defined(HAVE_GENERIC_FILLATTR_USERNS) && defined(HAVE_USERNS_IOPS_GETATTR) #ifdef HAVE_USERNS_IOPS_GETATTR
#ifdef HAVE_GENERIC_FILLATTR_USERNS
error = -zfs_getattr_fast(user_ns, ZTOI(dzp), stat); error = -zfs_getattr_fast(user_ns, ZTOI(dzp), stat);
#else
(void) user_ns;
#endif
#else #else
error = -zfs_getattr_fast(kcred->user_ns, ZTOI(dzp), stat); error = -zfs_getattr_fast(kcred->user_ns, ZTOI(dzp), stat);
#endif #endif

View File

@ -1828,7 +1828,6 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
return (0); return (0);
} }
/* ARGSUSED */
noinline static int noinline static int
receive_freeobjects(struct receive_writer_arg *rwa, receive_freeobjects(struct receive_writer_arg *rwa,
struct drr_freeobjects *drrfo) struct drr_freeobjects *drrfo)
@ -2230,7 +2229,6 @@ receive_spill(struct receive_writer_arg *rwa, struct drr_spill *drrs,
return (0); return (0);
} }
/* ARGSUSED */
noinline static int noinline static int
receive_free(struct receive_writer_arg *rwa, struct drr_free *drrf) receive_free(struct receive_writer_arg *rwa, struct drr_free *drrf)
{ {
@ -2305,7 +2303,6 @@ receive_object_range(struct receive_writer_arg *rwa,
* Until we have the ability to redact large ranges of data efficiently, we * Until we have the ability to redact large ranges of data efficiently, we
* process these records as frees. * process these records as frees.
*/ */
/* ARGSUSED */
noinline static int noinline static int
receive_redact(struct receive_writer_arg *rwa, struct drr_redact *drrr) receive_redact(struct receive_writer_arg *rwa, struct drr_redact *drrr)
{ {
@ -2454,7 +2451,6 @@ receive_read_payload_and_next_header(dmu_recv_cookie_t *drc, int len, void *buf)
* numbers in the ignore list. In practice, we receive up to 32 object records * numbers in the ignore list. In practice, we receive up to 32 object records
* before receiving write records, so the list can have up to 32 nodes in it. * before receiving write records, so the list can have up to 32 nodes in it.
*/ */
/* ARGSUSED */
static void static void
receive_read_prefetch(dmu_recv_cookie_t *drc, uint64_t object, uint64_t offset, receive_read_prefetch(dmu_recv_cookie_t *drc, uint64_t object, uint64_t offset,
uint64_t length) uint64_t length)

View File

@ -219,7 +219,6 @@ dmu_tx_check_ioerr(zio_t *zio, dnode_t *dn, int level, uint64_t blkid)
return (err); return (err);
} }
/* ARGSUSED */
static void static void
dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len) dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
{ {

View File

@ -1010,7 +1010,6 @@ dsl_pool_undirty_space(dsl_pool_t *dp, int64_t space, uint64_t txg)
mutex_exit(&dp->dp_lock); mutex_exit(&dp->dp_lock);
} }
/* ARGSUSED */
static int static int
upgrade_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) upgrade_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg)
{ {
@ -1101,7 +1100,6 @@ dsl_pool_upgrade_clones(dsl_pool_t *dp, dmu_tx_t *tx)
tx, DS_FIND_CHILDREN | DS_FIND_SERIALIZE)); tx, DS_FIND_CHILDREN | DS_FIND_SERIALIZE));
} }
/* ARGSUSED */
static int static int
upgrade_dir_clones_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg) upgrade_dir_clones_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg)
{ {

View File

@ -45,7 +45,6 @@ edonr_incremental(void *buf, size_t size, void *arg)
/* /*
* Native zio_checksum interface for the Edon-R hash function. * Native zio_checksum interface for the Edon-R hash function.
*/ */
/*ARGSUSED*/
void void
abd_checksum_edonr_native(abd_t *abd, uint64_t size, abd_checksum_edonr_native(abd_t *abd, uint64_t size,
const void *ctx_template, zio_cksum_t *zcp) const void *ctx_template, zio_cksum_t *zcp)

View File

@ -41,7 +41,6 @@ skein_incremental(void *buf, size_t size, void *arg)
* function requires the presence of a ctx_template that should be allocated * function requires the presence of a ctx_template that should be allocated
* using abd_checksum_skein_tmpl_init. * using abd_checksum_skein_tmpl_init.
*/ */
/*ARGSUSED*/
void void
abd_checksum_skein_native(abd_t *abd, uint64_t size, abd_checksum_skein_native(abd_t *abd, uint64_t size,
const void *ctx_template, zio_cksum_t *zcp) const void *ctx_template, zio_cksum_t *zcp)

View File

@ -248,7 +248,6 @@ spa_history_log_notify(spa_t *spa, nvlist_t *nvl)
/* /*
* Write out a history event. * Write out a history event.
*/ */
/*ARGSUSED*/
static void static void
spa_history_log_sync(void *arg, dmu_tx_t *tx) spa_history_log_sync(void *arg, dmu_tx_t *tx)
{ {

View File

@ -36,9 +36,7 @@ static
void void
zfs_oldace_byteswap(ace_t *ace, int ace_cnt) zfs_oldace_byteswap(ace_t *ace, int ace_cnt)
{ {
int i; for (int i = 0; i != ace_cnt; i++, ace++) {
for (i = 0; i != ace_cnt; i++, ace++) {
ace->a_who = BSWAP_32(ace->a_who); ace->a_who = BSWAP_32(ace->a_who);
ace->a_access_mask = BSWAP_32(ace->a_access_mask); ace->a_access_mask = BSWAP_32(ace->a_access_mask);
ace->a_flags = BSWAP_16(ace->a_flags); ace->a_flags = BSWAP_16(ace->a_flags);
@ -138,23 +136,16 @@ zfs_ace_byteswap(void *buf, size_t size, boolean_t zfs_layout)
} }
} }
/* ARGSUSED */
void void
zfs_oldacl_byteswap(void *buf, size_t size) zfs_oldacl_byteswap(void *buf, size_t size)
{ {
int cnt;
/* /*
* Arggh, since we don't know how many ACEs are in * Arggh, since we don't know how many ACEs are in
* the array, we have to swap the entire block * the array, we have to swap the entire block
*/ */
zfs_oldace_byteswap((ace_t *)buf, size / sizeof (ace_t));
cnt = size / sizeof (ace_t);
zfs_oldace_byteswap((ace_t *)buf, cnt);
} }
/* ARGSUSED */
void void
zfs_acl_byteswap(void *buf, size_t size) zfs_acl_byteswap(void *buf, size_t size)
{ {

View File

@ -373,10 +373,10 @@ zfs_log_history(zfs_cmd_t *zc)
* Policy for top-level read operations (list pools). Requires no privileges, * Policy for top-level read operations (list pools). Requires no privileges,
* and can be used in the local zone, as there is no associated dataset. * and can be used in the local zone, as there is no associated dataset.
*/ */
/* ARGSUSED */
static int static int
zfs_secpolicy_none(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_none(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc, (void) innvl, (void) cr;
return (0); return (0);
} }
@ -384,10 +384,10 @@ zfs_secpolicy_none(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
* Policy for dataset read operations (list children, get statistics). Requires * Policy for dataset read operations (list children, get statistics). Requires
* no privileges, but must be visible in the local zone. * no privileges, but must be visible in the local zone.
*/ */
/* ARGSUSED */
static int static int
zfs_secpolicy_read(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_read(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl, (void) cr;
if (INGLOBALZONE(curproc) || if (INGLOBALZONE(curproc) ||
zone_dataset_visible(zc->zc_name, NULL)) zone_dataset_visible(zc->zc_name, NULL))
return (0); return (0);
@ -656,35 +656,29 @@ zfs_secpolicy_setprop(const char *dsname, zfs_prop_t prop, nvpair_t *propval,
return (zfs_secpolicy_write_perms(dsname, zfs_prop_to_name(prop), cr)); return (zfs_secpolicy_write_perms(dsname, zfs_prop_to_name(prop), cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_set_fsacl(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_set_fsacl(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
int error;
error = zfs_dozonecheck(zc->zc_name, cr);
if (error != 0)
return (error);
/* /*
* permission to set permissions will be evaluated later in * permission to set permissions will be evaluated later in
* dsl_deleg_can_allow() * dsl_deleg_can_allow()
*/ */
return (0); (void) innvl;
return (zfs_dozonecheck(zc->zc_name, cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_rollback(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_rollback(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
return (zfs_secpolicy_write_perms(zc->zc_name, return (zfs_secpolicy_write_perms(zc->zc_name,
ZFS_DELEG_PERM_ROLLBACK, cr)); ZFS_DELEG_PERM_ROLLBACK, cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_send(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_send(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
dsl_pool_t *dp; dsl_pool_t *dp;
dsl_dataset_t *ds; dsl_dataset_t *ds;
const char *cp; const char *cp;
@ -717,10 +711,10 @@ zfs_secpolicy_send(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_send_new(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_send_new(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
return (zfs_secpolicy_write_perms(zc->zc_name, return (zfs_secpolicy_write_perms(zc->zc_name,
ZFS_DELEG_PERM_SEND, cr)); ZFS_DELEG_PERM_SEND, cr));
} }
@ -728,12 +722,14 @@ zfs_secpolicy_send_new(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
static int static int
zfs_secpolicy_share(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_share(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc, (void) innvl, (void) cr;
return (SET_ERROR(ENOTSUP)); return (SET_ERROR(ENOTSUP));
} }
static int static int
zfs_secpolicy_smb_acl(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_smb_acl(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc, (void) innvl, (void) cr;
return (SET_ERROR(ENOTSUP)); return (SET_ERROR(ENOTSUP));
} }
@ -771,10 +767,10 @@ zfs_secpolicy_destroy_perms(const char *name, cred_t *cr)
return (zfs_secpolicy_write_perms(name, ZFS_DELEG_PERM_DESTROY, cr)); return (zfs_secpolicy_write_perms(name, ZFS_DELEG_PERM_DESTROY, cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_destroy(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_destroy(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
return (zfs_secpolicy_destroy_perms(zc->zc_name, cr)); return (zfs_secpolicy_destroy_perms(zc->zc_name, cr));
} }
@ -782,10 +778,10 @@ zfs_secpolicy_destroy(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
* Destroying snapshots with delegated permissions requires * Destroying snapshots with delegated permissions requires
* descendant mount and destroy permissions. * descendant mount and destroy permissions.
*/ */
/* ARGSUSED */
static int static int
zfs_secpolicy_destroy_snaps(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_destroy_snaps(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc;
nvlist_t *snaps; nvlist_t *snaps;
nvpair_t *pair, *nextpair; nvpair_t *pair, *nextpair;
int error = 0; int error = 0;
@ -844,17 +840,17 @@ zfs_secpolicy_rename_perms(const char *from, const char *to, cred_t *cr)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_rename(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_rename(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
return (zfs_secpolicy_rename_perms(zc->zc_name, zc->zc_value, cr)); return (zfs_secpolicy_rename_perms(zc->zc_name, zc->zc_value, cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_promote(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_promote(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
dsl_pool_t *dp; dsl_pool_t *dp;
dsl_dataset_t *clone; dsl_dataset_t *clone;
int error; int error;
@ -899,10 +895,10 @@ zfs_secpolicy_promote(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_recv(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_recv(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
int error; int error;
if ((error = zfs_secpolicy_write_perms(zc->zc_name, if ((error = zfs_secpolicy_write_perms(zc->zc_name,
@ -917,13 +913,6 @@ zfs_secpolicy_recv(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
ZFS_DELEG_PERM_CREATE, cr)); ZFS_DELEG_PERM_CREATE, cr));
} }
/* ARGSUSED */
static int
zfs_secpolicy_recv_new(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{
return (zfs_secpolicy_recv(zc, innvl, cr));
}
int int
zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr) zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr)
{ {
@ -934,10 +923,10 @@ zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr)
/* /*
* Check for permission to create each snapshot in the nvlist. * Check for permission to create each snapshot in the nvlist.
*/ */
/* ARGSUSED */
static int static int
zfs_secpolicy_snapshot(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_snapshot(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc;
nvlist_t *snaps; nvlist_t *snaps;
int error = 0; int error = 0;
nvpair_t *pair; nvpair_t *pair;
@ -965,10 +954,10 @@ zfs_secpolicy_snapshot(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
/* /*
* Check for permission to create each bookmark in the nvlist. * Check for permission to create each bookmark in the nvlist.
*/ */
/* ARGSUSED */
static int static int
zfs_secpolicy_bookmark(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_bookmark(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc;
int error = 0; int error = 0;
for (nvpair_t *pair = nvlist_next_nvpair(innvl, NULL); for (nvpair_t *pair = nvlist_next_nvpair(innvl, NULL);
@ -990,10 +979,10 @@ zfs_secpolicy_bookmark(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_destroy_bookmarks(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_destroy_bookmarks(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc;
nvpair_t *pair, *nextpair; nvpair_t *pair, *nextpair;
int error = 0; int error = 0;
@ -1031,10 +1020,10 @@ zfs_secpolicy_destroy_bookmarks(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_log_history(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_log_history(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc, (void) innvl, (void) cr;
/* /*
* Even root must have a proper TSD so that we know what pool * Even root must have a proper TSD so that we know what pool
* to log to. * to log to.
@ -1072,10 +1061,11 @@ zfs_secpolicy_create_clone(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
* Policy for pool operations - create/destroy pools, add vdevs, etc. Requires * Policy for pool operations - create/destroy pools, add vdevs, etc. Requires
* SYS_CONFIG privilege, which is not available in a local zone. * SYS_CONFIG privilege, which is not available in a local zone.
*/ */
/* ARGSUSED */
int int
zfs_secpolicy_config(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_config(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc, (void) innvl;
if (secpolicy_sys_config(cr, B_FALSE) != 0) if (secpolicy_sys_config(cr, B_FALSE) != 0)
return (SET_ERROR(EPERM)); return (SET_ERROR(EPERM));
@ -1085,10 +1075,10 @@ zfs_secpolicy_config(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
/* /*
* Policy for object to name lookups. * Policy for object to name lookups.
*/ */
/* ARGSUSED */
static int static int
zfs_secpolicy_diff(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_diff(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
int error; int error;
if ((error = secpolicy_sys_config(cr, B_FALSE)) == 0) if ((error = secpolicy_sys_config(cr, B_FALSE)) == 0)
@ -1101,17 +1091,17 @@ zfs_secpolicy_diff(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
/* /*
* Policy for fault injection. Requires all privileges. * Policy for fault injection. Requires all privileges.
*/ */
/* ARGSUSED */
static int static int
zfs_secpolicy_inject(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_inject(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc, (void) innvl;
return (secpolicy_zinject(cr)); return (secpolicy_zinject(cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_inherit_prop(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_inherit_prop(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
zfs_prop_t prop = zfs_name_to_prop(zc->zc_value); zfs_prop_t prop = zfs_name_to_prop(zc->zc_value);
if (prop == ZPROP_INVAL) { if (prop == ZPROP_INVAL) {
@ -1174,18 +1164,18 @@ zfs_secpolicy_userspace_many(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
userquota_perms[zc->zc_objset_type], cr)); userquota_perms[zc->zc_objset_type], cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_userspace_upgrade(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_userspace_upgrade(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) innvl;
return (zfs_secpolicy_setprop(zc->zc_name, ZFS_PROP_VERSION, return (zfs_secpolicy_setprop(zc->zc_name, ZFS_PROP_VERSION,
NULL, cr)); NULL, cr));
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_hold(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_hold(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc;
nvpair_t *pair; nvpair_t *pair;
nvlist_t *holds; nvlist_t *holds;
int error; int error;
@ -1206,10 +1196,10 @@ zfs_secpolicy_hold(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
return (0); return (0);
} }
/* ARGSUSED */
static int static int
zfs_secpolicy_release(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) zfs_secpolicy_release(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr)
{ {
(void) zc;
nvpair_t *pair; nvpair_t *pair;
int error; int error;
@ -3149,7 +3139,6 @@ zfs_ioc_get_fsacl(zfs_cmd_t *zc)
return (error); return (error);
} }
/* ARGSUSED */
static void static void
zfs_create_cb(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx) zfs_create_cb(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx)
{ {
@ -3511,11 +3500,11 @@ static const zfs_ioc_key_t zfs_keys_remap[] = {
/* no nvl keys */ /* no nvl keys */
}; };
/* ARGSUSED */
static int static int
zfs_ioc_remap(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_remap(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
/* This IOCTL is no longer supported. */ /* This IOCTL is no longer supported. */
(void) fsname, (void) innvl, (void) outnvl;
return (0); return (0);
} }
@ -3603,10 +3592,10 @@ static const zfs_ioc_key_t zfs_keys_log_history[] = {
{"message", DATA_TYPE_STRING, 0}, {"message", DATA_TYPE_STRING, 0},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_log_history(const char *unused, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_log_history(const char *unused, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) unused, (void) outnvl;
const char *message; const char *message;
char *poolname; char *poolname;
spa_t *spa; spa_t *spa;
@ -3709,10 +3698,10 @@ zfs_unmount_snap(const char *snapname)
(void) zfsctl_snapshot_unmount(snapname, MNT_FORCE); (void) zfsctl_snapshot_unmount(snapname, MNT_FORCE);
} }
/* ARGSUSED */
static int static int
zfs_unmount_snap_cb(const char *snapname, void *arg) zfs_unmount_snap_cb(const char *snapname, void *arg)
{ {
(void) arg;
zfs_unmount_snap(snapname); zfs_unmount_snap(snapname);
return (0); return (0);
} }
@ -3756,7 +3745,6 @@ static const zfs_ioc_key_t zfs_keys_destroy_snaps[] = {
{"defer", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, {"defer", DATA_TYPE_BOOLEAN, ZK_OPTIONAL},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
@ -3809,10 +3797,10 @@ static const zfs_ioc_key_t zfs_keys_bookmark[] = {
{"<bookmark>...", DATA_TYPE_STRING, ZK_WILDCARDLIST}, {"<bookmark>...", DATA_TYPE_STRING, ZK_WILDCARDLIST},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_bookmark(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_bookmark(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) poolname;
return (dsl_bookmark_create(innvl, outnvl)); return (dsl_bookmark_create(innvl, outnvl));
} }
@ -3849,11 +3837,11 @@ static const zfs_ioc_key_t zfs_keys_get_bookmark_props[] = {
/* no nvl keys */ /* no nvl keys */
}; };
/* ARGSUSED */
static int static int
zfs_ioc_get_bookmark_props(const char *bookmark, nvlist_t *innvl, zfs_ioc_get_bookmark_props(const char *bookmark, nvlist_t *innvl,
nvlist_t *outnvl) nvlist_t *outnvl)
{ {
(void) innvl;
char fsname[ZFS_MAX_DATASET_NAME_LEN]; char fsname[ZFS_MAX_DATASET_NAME_LEN];
char *bmname; char *bmname;
@ -3958,10 +3946,10 @@ static const zfs_ioc_key_t zfs_keys_pool_checkpoint[] = {
/* no nvl keys */ /* no nvl keys */
}; };
/* ARGSUSED */
static int static int
zfs_ioc_pool_checkpoint(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_pool_checkpoint(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) innvl, (void) outnvl;
return (spa_checkpoint(poolname)); return (spa_checkpoint(poolname));
} }
@ -3973,11 +3961,11 @@ static const zfs_ioc_key_t zfs_keys_pool_discard_checkpoint[] = {
/* no nvl keys */ /* no nvl keys */
}; };
/* ARGSUSED */
static int static int
zfs_ioc_pool_discard_checkpoint(const char *poolname, nvlist_t *innvl, zfs_ioc_pool_discard_checkpoint(const char *poolname, nvlist_t *innvl,
nvlist_t *outnvl) nvlist_t *outnvl)
{ {
(void) innvl, (void) outnvl;
return (spa_checkpoint_discard(poolname)); return (spa_checkpoint_discard(poolname));
} }
@ -4339,7 +4327,6 @@ static const zfs_ioc_key_t zfs_keys_rollback[] = {
{"target", DATA_TYPE_STRING, ZK_OPTIONAL}, {"target", DATA_TYPE_STRING, ZK_OPTIONAL},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
@ -4411,14 +4398,15 @@ recursive_unmount(const char *fsname, void *arg)
* outnvl is unused * outnvl is unused
*/ */
/* ARGSUSED */
static const zfs_ioc_key_t zfs_keys_redact[] = { static const zfs_ioc_key_t zfs_keys_redact[] = {
{"bookname", DATA_TYPE_STRING, 0}, {"bookname", DATA_TYPE_STRING, 0},
{"snapnv", DATA_TYPE_NVLIST, 0}, {"snapnv", DATA_TYPE_NVLIST, 0},
}; };
static int static int
zfs_ioc_redact(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_redact(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) outnvl;
nvlist_t *redactnvl = NULL; nvlist_t *redactnvl = NULL;
char *redactbook = NULL; char *redactbook = NULL;
@ -5800,10 +5788,10 @@ static const zfs_ioc_key_t zfs_keys_pool_reopen[] = {
{"scrub_restart", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL}, {"scrub_restart", DATA_TYPE_BOOLEAN_VALUE, ZK_OPTIONAL},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_pool_reopen(const char *pool, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_pool_reopen(const char *pool, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) outnvl;
spa_t *spa; spa_t *spa;
int error; int error;
boolean_t rc, scrub_restart = B_TRUE; boolean_t rc, scrub_restart = B_TRUE;
@ -6210,10 +6198,10 @@ static const zfs_ioc_key_t zfs_keys_hold[] = {
{"cleanup_fd", DATA_TYPE_INT32, ZK_OPTIONAL}, {"cleanup_fd", DATA_TYPE_INT32, ZK_OPTIONAL},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_t *errlist) zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_t *errlist)
{ {
(void) pool;
nvpair_t *pair; nvpair_t *pair;
nvlist_t *holds; nvlist_t *holds;
int cleanup_fd = -1; int cleanup_fd = -1;
@ -6262,10 +6250,10 @@ static const zfs_ioc_key_t zfs_keys_get_holds[] = {
/* no nvl keys */ /* no nvl keys */
}; };
/* ARGSUSED */
static int static int
zfs_ioc_get_holds(const char *snapname, nvlist_t *args, nvlist_t *outnvl) zfs_ioc_get_holds(const char *snapname, nvlist_t *args, nvlist_t *outnvl)
{ {
(void) args;
return (dsl_dataset_get_holds(snapname, outnvl)); return (dsl_dataset_get_holds(snapname, outnvl));
} }
@ -6284,10 +6272,10 @@ static const zfs_ioc_key_t zfs_keys_release[] = {
{"<snapname>...", DATA_TYPE_NVLIST, ZK_WILDCARDLIST}, {"<snapname>...", DATA_TYPE_NVLIST, ZK_WILDCARDLIST},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_release(const char *pool, nvlist_t *holds, nvlist_t *errlist) zfs_ioc_release(const char *pool, nvlist_t *holds, nvlist_t *errlist)
{ {
(void) pool;
return (dsl_dataset_user_release(holds, errlist)); return (dsl_dataset_user_release(holds, errlist));
} }
@ -6521,10 +6509,10 @@ static const zfs_ioc_key_t zfs_keys_send_new[] = {
{"redactbook", DATA_TYPE_STRING, ZK_OPTIONAL}, {"redactbook", DATA_TYPE_STRING, ZK_OPTIONAL},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) outnvl;
int error; int error;
offset_t off; offset_t off;
char *fromname = NULL; char *fromname = NULL;
@ -6571,11 +6559,12 @@ zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
send_space_sum(objset_t *os, void *buf, int len, void *arg) send_space_sum(objset_t *os, void *buf, int len, void *arg)
{ {
(void) os, (void) buf;
uint64_t *size = arg; uint64_t *size = arg;
*size += len; *size += len;
return (0); return (0);
} }
@ -6767,10 +6756,10 @@ static const zfs_ioc_key_t zfs_keys_pool_sync[] = {
{"force", DATA_TYPE_BOOLEAN_VALUE, 0}, {"force", DATA_TYPE_BOOLEAN_VALUE, 0},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_pool_sync(const char *pool, nvlist_t *innvl, nvlist_t *onvl) zfs_ioc_pool_sync(const char *pool, nvlist_t *innvl, nvlist_t *onvl)
{ {
(void) onvl;
int err; int err;
boolean_t rc, force = B_FALSE; boolean_t rc, force = B_FALSE;
spa_t *spa; spa_t *spa;
@ -6810,10 +6799,10 @@ static const zfs_ioc_key_t zfs_keys_load_key[] = {
{"noop", DATA_TYPE_BOOLEAN, ZK_OPTIONAL}, {"noop", DATA_TYPE_BOOLEAN, ZK_OPTIONAL},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_load_key(const char *dsname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_load_key(const char *dsname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) outnvl;
int ret; int ret;
dsl_crypto_params_t *dcp = NULL; dsl_crypto_params_t *dcp = NULL;
nvlist_t *hidden_args; nvlist_t *hidden_args;
@ -6852,10 +6841,10 @@ static const zfs_ioc_key_t zfs_keys_unload_key[] = {
/* no nvl keys */ /* no nvl keys */
}; };
/* ARGSUSED */
static int static int
zfs_ioc_unload_key(const char *dsname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_unload_key(const char *dsname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) innvl, (void) outnvl;
int ret = 0; int ret = 0;
if (strchr(dsname, '@') != NULL || strchr(dsname, '%') != NULL) { if (strchr(dsname, '@') != NULL || strchr(dsname, '%') != NULL) {
@ -6890,10 +6879,10 @@ static const zfs_ioc_key_t zfs_keys_change_key[] = {
{"props", DATA_TYPE_NVLIST, ZK_OPTIONAL}, {"props", DATA_TYPE_NVLIST, ZK_OPTIONAL},
}; };
/* ARGSUSED */
static int static int
zfs_ioc_change_key(const char *dsname, nvlist_t *innvl, nvlist_t *outnvl) zfs_ioc_change_key(const char *dsname, nvlist_t *innvl, nvlist_t *outnvl)
{ {
(void) outnvl;
int ret; int ret;
uint64_t cmd = DCP_CMD_NONE; uint64_t cmd = DCP_CMD_NONE;
dsl_crypto_params_t *dcp = NULL; dsl_crypto_params_t *dcp = NULL;
@ -7122,7 +7111,7 @@ zfs_ioctl_init(void)
ARRAY_SIZE(zfs_keys_destroy_bookmarks)); ARRAY_SIZE(zfs_keys_destroy_bookmarks));
zfs_ioctl_register("receive", ZFS_IOC_RECV_NEW, zfs_ioctl_register("receive", ZFS_IOC_RECV_NEW,
zfs_ioc_recv_new, zfs_secpolicy_recv_new, DATASET_NAME, zfs_ioc_recv_new, zfs_secpolicy_recv, DATASET_NAME,
POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE, POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY, B_TRUE, B_TRUE,
zfs_keys_recv_new, ARRAY_SIZE(zfs_keys_recv_new)); zfs_keys_recv_new, ARRAY_SIZE(zfs_keys_recv_new));
zfs_ioctl_register("load-key", ZFS_IOC_LOAD_KEY, zfs_ioctl_register("load-key", ZFS_IOC_LOAD_KEY,

View File

@ -80,10 +80,10 @@ zfs_init_vattr(vattr_t *vap, uint64_t mask, uint64_t mode,
vap->va_nodeid = nodeid; vap->va_nodeid = nodeid;
} }
/* ARGSUSED */
static int static int
zfs_replay_error(void *arg1, void *arg2, boolean_t byteswap) zfs_replay_error(void *arg1, void *arg2, boolean_t byteswap)
{ {
(void) arg1, (void) arg2, (void) byteswap;
return (SET_ERROR(ENOTSUP)); return (SET_ERROR(ENOTSUP));
} }

View File

@ -154,7 +154,6 @@ zfs_holey(znode_t *zp, ulong_t cmd, loff_t *off)
} }
#endif /* SEEK_HOLE && SEEK_DATA */ #endif /* SEEK_HOLE && SEEK_DATA */
/*ARGSUSED*/
int int
zfs_access(znode_t *zp, int mode, int flag, cred_t *cr) zfs_access(znode_t *zp, int mode, int flag, cred_t *cr)
{ {
@ -192,10 +191,10 @@ static unsigned long zfs_vnops_read_chunk_size = 1024 * 1024; /* Tunable */
* Side Effects: * Side Effects:
* inode - atime updated if byte count > 0 * inode - atime updated if byte count > 0
*/ */
/* ARGSUSED */
int int
zfs_read(struct znode *zp, zfs_uio_t *uio, int ioflag, cred_t *cr) zfs_read(struct znode *zp, zfs_uio_t *uio, int ioflag, cred_t *cr)
{ {
(void) cr;
int error = 0; int error = 0;
boolean_t frsync = B_FALSE; boolean_t frsync = B_FALSE;
@ -389,8 +388,6 @@ zfs_clear_setid_bits_if_necessary(zfsvfs_t *zfsvfs, znode_t *zp, cred_t *cr,
* Timestamps: * Timestamps:
* ip - ctime|mtime updated if byte count > 0 * ip - ctime|mtime updated if byte count > 0
*/ */
/* ARGSUSED */
int int
zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr) zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr)
{ {
@ -779,7 +776,6 @@ zfs_write(znode_t *zp, zfs_uio_t *uio, int ioflag, cred_t *cr)
return (0); return (0);
} }
/*ARGSUSED*/
int int
zfs_getsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr) zfs_getsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr)
{ {
@ -795,7 +791,6 @@ zfs_getsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr)
return (error); return (error);
} }
/*ARGSUSED*/
int int
zfs_setsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr) zfs_setsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr)
{ {
@ -965,10 +960,10 @@ zfs_get_data(void *arg, uint64_t gen, lr_write_t *lr, char *buf,
} }
/* ARGSUSED */
static void static void
zfs_get_done(zgd_t *zgd, int error) zfs_get_done(zgd_t *zgd, int error)
{ {
(void) error;
znode_t *zp = zgd->zgd_private; znode_t *zp = zgd->zgd_private;
if (zgd->zgd_db) if (zgd->zgd_db)

View File

@ -341,15 +341,14 @@ zio_handle_label_injection(zio_t *zio, int error)
return (ret); return (ret);
} }
/*ARGSUSED*/
static int static int
zio_inject_bitflip_cb(void *data, size_t len, void *private) zio_inject_bitflip_cb(void *data, size_t len, void *private)
{ {
zio_t *zio __maybe_unused = private; zio_t *zio = private;
uint8_t *buffer = data; uint8_t *buffer = data;
uint_t byte = random_in_range(len); uint_t byte = random_in_range(len);
ASSERT(zio->io_type == ZIO_TYPE_READ); ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ);
/* flip a single random bit in an abd data buffer */ /* flip a single random bit in an abd data buffer */
buffer[byte] ^= 1 << random_in_range(8); buffer[byte] ^= 1 << random_in_range(8);

View File

@ -613,10 +613,10 @@ zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, uint64_t len,
} }
/* ARGSUSED */
static void static void
zvol_get_done(zgd_t *zgd, int error) zvol_get_done(zgd_t *zgd, int error)
{ {
(void) error;
if (zgd->zgd_db) if (zgd->zgd_db)
dmu_buf_rele(zgd->zgd_db, zgd); dmu_buf_rele(zgd->zgd_db, zgd);
@ -1511,10 +1511,10 @@ zvol_set_snapdev_check(void *arg, dmu_tx_t *tx)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
zvol_set_snapdev_sync_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg) zvol_set_snapdev_sync_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg)
{ {
(void) arg;
char dsname[MAXNAMELEN]; char dsname[MAXNAMELEN];
zvol_task_t *task; zvol_task_t *task;
uint64_t snapdev; uint64_t snapdev;
@ -1597,10 +1597,10 @@ zvol_set_volmode_check(void *arg, dmu_tx_t *tx)
return (error); return (error);
} }
/* ARGSUSED */
static int static int
zvol_set_volmode_sync_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg) zvol_set_volmode_sync_cb(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg)
{ {
(void) arg;
char dsname[MAXNAMELEN]; char dsname[MAXNAMELEN];
zvol_task_t *task; zvol_task_t *task;
uint64_t volmode; uint64_t volmode;