mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
@@ -338,10 +338,10 @@ callb_generic_cpr(void *arg, int code)
|
||||
* The generic callback function associated with kernel threads which
|
||||
* are always considered safe.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
boolean_t
|
||||
callb_generic_cpr_safe(void *arg, int code)
|
||||
{
|
||||
(void) arg, (void) code;
|
||||
return (B_TRUE);
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -40,19 +40,17 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/kobj.h>
|
||||
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void *
|
||||
zcalloc(void *opaque, uint_t items, uint_t size)
|
||||
{
|
||||
|
||||
(void) opaque;
|
||||
return (malloc((size_t)items*size, M_SOLARIS, M_NOWAIT));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
zcfree(void *opaque, void *ptr)
|
||||
{
|
||||
|
||||
(void) opaque;
|
||||
free(ptr, M_SOLARIS);
|
||||
}
|
||||
|
||||
|
||||
@@ -144,10 +144,10 @@ zfs_ace_v0_set_who(void *acep, uint64_t who)
|
||||
((zfs_oldace_t *)acep)->z_fuid = who;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static size_t
|
||||
zfs_ace_v0_size(void *acep)
|
||||
{
|
||||
(void) acep;
|
||||
return (sizeof (zfs_oldace_t));
|
||||
}
|
||||
|
||||
@@ -163,10 +163,10 @@ zfs_ace_v0_mask_off(void)
|
||||
return (offsetof(zfs_oldace_t, z_access_mask));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_ace_v0_data(void *acep, void **datap)
|
||||
{
|
||||
(void) acep;
|
||||
*datap = NULL;
|
||||
return (0);
|
||||
}
|
||||
@@ -631,11 +631,11 @@ zfs_acl_next_ace(zfs_acl_t *aclp, void *start, uint64_t *who,
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static uint64_t
|
||||
zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt,
|
||||
uint16_t *flags, uint16_t *type, uint32_t *mask)
|
||||
{
|
||||
(void) aclcnt;
|
||||
zfs_acl_t *aclp = datap;
|
||||
zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)(uintptr_t)cookie;
|
||||
uint64_t who;
|
||||
@@ -1120,11 +1120,11 @@ done:
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
zfs_acl_data_locator(void **dataptr, uint32_t *length, uint32_t buflen,
|
||||
boolean_t start, void *userdata)
|
||||
{
|
||||
(void) buflen;
|
||||
zfs_acl_locator_cb_t *cb = (zfs_acl_locator_cb_t *)userdata;
|
||||
|
||||
if (start) {
|
||||
|
||||
@@ -456,10 +456,10 @@ zfsctl_common_open(struct vop_open_args *ap)
|
||||
/*
|
||||
* Common close routine. Nothing to do here.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
zfsctl_common_close(struct vop_close_args *ap)
|
||||
{
|
||||
(void) ap;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +397,6 @@ zfs_is_readonly(zfsvfs_t *zfsvfs)
|
||||
return (!!(zfsvfs->z_vfs->vfs_flag & VFS_RDONLY));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_sync(vfs_t *vfsp, int waitfor)
|
||||
{
|
||||
@@ -1310,7 +1309,6 @@ fetch_osname_options(char *name, bool *checkpointrewind)
|
||||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_mount(vfs_t *vfsp)
|
||||
{
|
||||
@@ -1641,7 +1639,6 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_umount(vfs_t *vfsp, int fflag)
|
||||
{
|
||||
|
||||
@@ -220,11 +220,10 @@ typedef ulong_t cookie_t;
|
||||
* ZFS_EXIT(zfsvfs); // finished in zfs
|
||||
* return (error); // done, report error
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
zfs_open(vnode_t **vpp, int flag, cred_t *cr)
|
||||
{
|
||||
(void) cr;
|
||||
znode_t *zp = VTOZ(*vpp);
|
||||
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
|
||||
|
||||
@@ -245,10 +244,10 @@ zfs_open(vnode_t **vpp, int flag, cred_t *cr)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
zfs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr)
|
||||
{
|
||||
(void) offset, (void) cr;
|
||||
znode_t *zp = VTOZ(vp);
|
||||
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);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
zfs_ioctl(vnode_t *vp, ulong_t com, intptr_t data, int flag, cred_t *cred,
|
||||
int *rvalp)
|
||||
{
|
||||
(void) flag, (void) cred, (void) rvalp;
|
||||
loff_t off;
|
||||
int error;
|
||||
|
||||
@@ -764,7 +763,6 @@ zfs_lookup_lock(vnode_t *dvp, vnode_t *vp, const char *name, int lkflags)
|
||||
* Timestamps:
|
||||
* NA
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp,
|
||||
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
|
||||
* vp - ctime|mtime always, atime if new
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
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)
|
||||
{
|
||||
(void) excl, (void) mode, (void) flag;
|
||||
znode_t *zp;
|
||||
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
|
||||
zilog_t *zilog;
|
||||
@@ -1201,8 +1198,6 @@ out:
|
||||
* dvp - ctime|mtime
|
||||
* vp - ctime (if nlink > 0)
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
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
|
||||
* vp - ctime|mtime|atime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp,
|
||||
cred_t *cr, int flags, vsecattr_t *vsecp)
|
||||
{
|
||||
(void) flags, (void) vsecp;
|
||||
znode_t *zp;
|
||||
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
|
||||
zilog_t *zilog;
|
||||
@@ -1567,7 +1562,6 @@ cache_vop_rmdir(struct vnode *dvp, struct vnode *vp)
|
||||
* Timestamps:
|
||||
* dvp - ctime|mtime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
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 the offset 2 for the '.zfs' directory.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp,
|
||||
int *ncookies, cookie_t **cookies)
|
||||
@@ -1994,7 +1987,6 @@ update:
|
||||
*
|
||||
* RETURN: 0 (always succeeds).
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
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:
|
||||
* vp - ctime updated, mtime updated if size changed.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
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:
|
||||
* sdvp,tdvp - ctime|mtime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_do_rename(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
|
||||
vnode_t *tdvp, vnode_t **tvpp, struct componentname *tcnp,
|
||||
@@ -3514,11 +3504,11 @@ fail:
|
||||
* Timestamps:
|
||||
* dvp - ctime|mtime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
|
||||
const char *link, znode_t **zpp, cred_t *cr, int flags)
|
||||
{
|
||||
(void) flags;
|
||||
znode_t *zp;
|
||||
dmu_tx_t *tx;
|
||||
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
|
||||
@@ -3653,10 +3643,10 @@ zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
|
||||
* Timestamps:
|
||||
* vp - atime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
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);
|
||||
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
|
||||
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
|
||||
* svp - ctime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_link(znode_t *tdzp, znode_t *szp, const char *name, cred_t *cr,
|
||||
int flags)
|
||||
{
|
||||
(void) flags;
|
||||
znode_t *tzp;
|
||||
zfsvfs_t *zfsvfs = tdzp->z_zfsvfs;
|
||||
zilog_t *zilog;
|
||||
@@ -3839,11 +3829,11 @@ zfs_link(znode_t *tdzp, znode_t *szp, const char *name, cred_t *cr,
|
||||
* Timestamps:
|
||||
* ip - ctime|mtime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
|
||||
offset_t offset, cred_t *cr)
|
||||
{
|
||||
(void) offset;
|
||||
zfsvfs_t *zfsvfs = ZTOZSB(zp);
|
||||
uint64_t off, len;
|
||||
int error;
|
||||
@@ -3890,10 +3880,10 @@ zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
zfs_inactive(vnode_t *vp, cred_t *cr, caller_context_t *ct)
|
||||
{
|
||||
(void) cr, (void) ct;
|
||||
znode_t *zp = VTOZ(vp);
|
||||
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
|
||||
int error;
|
||||
@@ -3942,10 +3932,10 @@ _Static_assert(sizeof (struct zfid_short) <= sizeof (struct fid),
|
||||
_Static_assert(sizeof (struct zfid_long) <= sizeof (struct fid),
|
||||
"struct zfid_long bigger than struct fid");
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_fid(vnode_t *vp, fid_t *fidp, caller_context_t *ct)
|
||||
{
|
||||
(void) ct;
|
||||
znode_t *zp = VTOZ(vp);
|
||||
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
|
||||
uint32_t gen;
|
||||
|
||||
@@ -156,10 +156,10 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
zfs_znode_cache_destructor(void *buf, void *arg)
|
||||
{
|
||||
(void) arg;
|
||||
znode_t *zp = buf;
|
||||
|
||||
ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs));
|
||||
|
||||
@@ -203,7 +203,6 @@ static int zvol_geom_bio_getattr(struct bio *bp);
|
||||
* GEOM mode implementation
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zvol_geom_open(struct g_provider *pp, int flag, int count)
|
||||
{
|
||||
@@ -336,10 +335,10 @@ out_locked:
|
||||
return (err);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zvol_geom_close(struct g_provider *pp, int flag, int count)
|
||||
{
|
||||
(void) flag;
|
||||
zvol_state_t *zv;
|
||||
boolean_t drop_suspend = B_TRUE;
|
||||
int new_open_count;
|
||||
|
||||
@@ -144,10 +144,10 @@ zfs_ace_v0_set_who(void *acep, uint64_t who)
|
||||
((zfs_oldace_t *)acep)->z_fuid = who;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static size_t
|
||||
zfs_ace_v0_size(void *acep)
|
||||
{
|
||||
(void) acep;
|
||||
return (sizeof (zfs_oldace_t));
|
||||
}
|
||||
|
||||
@@ -163,10 +163,10 @@ zfs_ace_v0_mask_off(void)
|
||||
return (offsetof(zfs_oldace_t, z_access_mask));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_ace_v0_data(void *acep, void **datap)
|
||||
{
|
||||
(void) acep;
|
||||
*datap = NULL;
|
||||
return (0);
|
||||
}
|
||||
@@ -629,11 +629,11 @@ zfs_acl_next_ace(zfs_acl_t *aclp, void *start, uint64_t *who,
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static uint64_t
|
||||
zfs_ace_walk(void *datap, uint64_t cookie, int aclcnt,
|
||||
uint16_t *flags, uint16_t *type, uint32_t *mask)
|
||||
{
|
||||
(void) aclcnt;
|
||||
zfs_acl_t *aclp = datap;
|
||||
zfs_ace_hdr_t *acep = (zfs_ace_hdr_t *)(uintptr_t)cookie;
|
||||
uint64_t who;
|
||||
@@ -1130,11 +1130,11 @@ done:
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
zfs_acl_data_locator(void **dataptr, uint32_t *length, uint32_t buflen,
|
||||
boolean_t start, void *userdata)
|
||||
{
|
||||
(void) buflen;
|
||||
zfs_acl_locator_cb_t *cb = (zfs_acl_locator_cb_t *)userdata;
|
||||
|
||||
if (start) {
|
||||
|
||||
@@ -256,10 +256,10 @@ zfs_is_readonly(zfsvfs_t *zfsvfs)
|
||||
return (!!(zfsvfs->z_sb->s_flags & SB_RDONLY));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_sync(struct super_block *sb, int wait, cred_t *cr)
|
||||
{
|
||||
(void) cr;
|
||||
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.
|
||||
* It is our responsibility to release any remaining infrastructure.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_umount(struct super_block *sb)
|
||||
{
|
||||
@@ -2128,7 +2127,6 @@ zfs_get_vfs_flag_unmounted(objset_t *os)
|
||||
return (unmounted);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
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
|
||||
* virtue of zfsvfs->z_sb->s_op->show_devname.
|
||||
*/
|
||||
(void) oldname, (void) newname;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -174,11 +174,10 @@
|
||||
* ZFS_EXIT(zfsvfs); // finished in zfs
|
||||
* return (error); // done, report error
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_open(struct inode *ip, int mode, int flag, cred_t *cr)
|
||||
{
|
||||
(void) cr;
|
||||
znode_t *zp = ITOZ(ip);
|
||||
zfsvfs_t *zfsvfs = ITOZSB(ip);
|
||||
|
||||
@@ -200,10 +199,10 @@ zfs_open(struct inode *ip, int mode, int flag, cred_t *cr)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_close(struct inode *ip, int flag, cred_t *cr)
|
||||
{
|
||||
(void) cr;
|
||||
znode_t *zp = ITOZ(ip);
|
||||
zfsvfs_t *zfsvfs = ITOZSB(ip);
|
||||
|
||||
@@ -415,7 +414,6 @@ zfs_zrele_async(znode_t *zp)
|
||||
* Timestamps:
|
||||
* NA
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_lookup(znode_t *zdp, char *nm, znode_t **zpp, int flags, cred_t *cr,
|
||||
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
|
||||
* zp - ctime|mtime always, atime if new
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
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)
|
||||
@@ -782,11 +778,11 @@ out:
|
||||
return (error);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_tmpfile(struct inode *dip, vattr_t *vap, int excl,
|
||||
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);
|
||||
zfsvfs_t *zfsvfs = ITOZSB(dip);
|
||||
objset_t *os;
|
||||
@@ -920,7 +916,6 @@ out:
|
||||
|
||||
static uint64_t null_xattr = 0;
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_remove(znode_t *dzp, char *name, cred_t *cr, int flags)
|
||||
{
|
||||
@@ -1160,7 +1155,6 @@ out:
|
||||
* dzp - ctime|mtime updated
|
||||
* zpp - ctime|mtime|atime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap, znode_t **zpp,
|
||||
cred_t *cr, int flags, vsecattr_t *vsecp)
|
||||
@@ -1349,7 +1343,6 @@ out:
|
||||
* Timestamps:
|
||||
* dzp - ctime|mtime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd, cred_t *cr,
|
||||
int flags)
|
||||
@@ -1482,10 +1475,10 @@ out:
|
||||
* We use 0 for '.', and 1 for '..'. If this is the root of the filesystem,
|
||||
* we use the offset 2 for the '.zfs' directory.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_readdir(struct inode *ip, zpl_dir_context_t *ctx, cred_t *cr)
|
||||
{
|
||||
(void) cr;
|
||||
znode_t *zp = ITOZ(ip);
|
||||
zfsvfs_t *zfsvfs = ITOZSB(ip);
|
||||
objset_t *os;
|
||||
@@ -1635,7 +1628,6 @@ out:
|
||||
*
|
||||
* RETURN: 0 (always succeeds)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_getattr_fast(struct user_namespace *user_ns, struct inode *ip,
|
||||
struct kstat *sp)
|
||||
@@ -1823,7 +1815,6 @@ next:
|
||||
* Timestamps:
|
||||
* ip - ctime updated, mtime updated if size changed.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
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:
|
||||
* sdzp,tdzp - ctime|mtime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_rename(znode_t *sdzp, char *snm, znode_t *tdzp, char *tnm,
|
||||
cred_t *cr, int flags)
|
||||
@@ -3020,7 +3010,6 @@ out:
|
||||
* Timestamps:
|
||||
* dip - ctime|mtime updated
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_symlink(znode_t *dzp, char *name, vattr_t *vap, char *link,
|
||||
znode_t **zpp, cred_t *cr, int flags)
|
||||
@@ -3188,10 +3177,10 @@ top:
|
||||
* Timestamps:
|
||||
* ip - atime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_readlink(struct inode *ip, zfs_uio_t *uio, cred_t *cr)
|
||||
{
|
||||
(void) cr;
|
||||
znode_t *zp = ITOZ(ip);
|
||||
zfsvfs_t *zfsvfs = ITOZSB(ip);
|
||||
int error;
|
||||
@@ -3227,7 +3216,6 @@ zfs_readlink(struct inode *ip, zfs_uio_t *uio, cred_t *cr)
|
||||
* tdzp - ctime|mtime updated
|
||||
* szp - ctime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_link(znode_t *tdzp, znode_t *szp, char *name, cred_t *cr,
|
||||
int flags)
|
||||
@@ -3430,7 +3418,6 @@ zfs_putpage_commit_cb(void *arg)
|
||||
* Timestamps:
|
||||
* ip - ctime|mtime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc)
|
||||
{
|
||||
@@ -3687,7 +3674,6 @@ out:
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
zfs_inactive(struct inode *ip)
|
||||
{
|
||||
@@ -3791,7 +3777,6 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages)
|
||||
* Timestamps:
|
||||
* vp - atime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
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
|
||||
* error code if failure
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_map(struct inode *ip, offset_t off, caddr_t *addrp, size_t len,
|
||||
unsigned long vm_flags)
|
||||
{
|
||||
(void) addrp;
|
||||
znode_t *zp = ITOZ(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:
|
||||
* zp - ctime|mtime updated
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
|
||||
offset_t offset, cred_t *cr)
|
||||
{
|
||||
(void) offset;
|
||||
zfsvfs_t *zfsvfs = ZTOZSB(zp);
|
||||
uint64_t off, len;
|
||||
int error;
|
||||
@@ -3926,7 +3911,6 @@ zfs_space(znode_t *zp, int cmd, flock64_t *bfp, int flag,
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zfs_fid(struct inode *ip, fid_t *fidp)
|
||||
{
|
||||
|
||||
@@ -113,10 +113,10 @@ zfs_rangelock_cb(zfs_locked_range_t *new, void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
|
||||
{
|
||||
(void) arg, (void) kmflags;
|
||||
znode_t *zp = buf;
|
||||
|
||||
inode_init_once(ZTOI(zp));
|
||||
@@ -137,10 +137,10 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
zfs_znode_cache_destructor(void *buf, void *arg)
|
||||
{
|
||||
(void) arg;
|
||||
znode_t *zp = buf;
|
||||
|
||||
ASSERT(!list_link_active(&zp->z_link_node));
|
||||
@@ -159,6 +159,7 @@ zfs_znode_cache_destructor(void *buf, void *arg)
|
||||
static int
|
||||
zfs_znode_hold_cache_constructor(void *buf, void *arg, int kmflags)
|
||||
{
|
||||
(void) arg, (void) kmflags;
|
||||
znode_hold_t *zh = buf;
|
||||
|
||||
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
|
||||
zfs_znode_hold_cache_destructor(void *buf, void *arg)
|
||||
{
|
||||
(void) arg;
|
||||
znode_hold_t *zh = buf;
|
||||
|
||||
mutex_destroy(&zh->zh_lock);
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
/*
|
||||
* Common open routine. Disallow any write access.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
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.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
#ifdef HAVE_USERNS_IOPS_GETATTR
|
||||
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)
|
||||
#endif
|
||||
{
|
||||
(void) request_mask, (void) query_flags;
|
||||
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);
|
||||
#else
|
||||
(void) user_ns;
|
||||
#endif
|
||||
#else
|
||||
generic_fillattr(ip, stat);
|
||||
#endif
|
||||
@@ -382,7 +385,6 @@ zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode)
|
||||
/*
|
||||
* Get snapshot directory attributes.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
#ifdef HAVE_USERNS_IOPS_GETATTR
|
||||
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)
|
||||
#endif
|
||||
{
|
||||
(void) request_mask, (void) query_flags;
|
||||
struct inode *ip = path->dentry->d_inode;
|
||||
zfsvfs_t *zfsvfs = ITOZSB(ip);
|
||||
|
||||
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);
|
||||
#else
|
||||
(void) user_ns;
|
||||
#endif
|
||||
#else
|
||||
generic_fillattr(ip, stat);
|
||||
#endif
|
||||
@@ -524,7 +531,6 @@ zpl_shares_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
}
|
||||
#endif /* !HAVE_VFS_ITERATE && !HAVE_VFS_ITERATE_SHARED */
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
#ifdef HAVE_USERNS_IOPS_GETATTR
|
||||
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)
|
||||
#endif
|
||||
{
|
||||
(void) request_mask, (void) query_flags;
|
||||
struct inode *ip = path->dentry->d_inode;
|
||||
zfsvfs_t *zfsvfs = ITOZSB(ip);
|
||||
znode_t *dzp;
|
||||
@@ -543,8 +550,12 @@ zpl_shares_getattr_impl(const struct path *path, struct kstat *stat,
|
||||
ZPL_ENTER(zfsvfs);
|
||||
|
||||
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);
|
||||
#else
|
||||
(void) user_ns;
|
||||
#endif
|
||||
#else
|
||||
generic_fillattr(path->dentry->d_inode, stat);
|
||||
#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);
|
||||
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);
|
||||
#else
|
||||
(void) user_ns;
|
||||
#endif
|
||||
#else
|
||||
error = -zfs_getattr_fast(kcred->user_ns, ZTOI(dzp), stat);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user