VFS_QUOTACTL: Remove needless casts of arg
The argument is a void * so there's no need to cast it to caddr_t. Update documentation to match function decleration. Reviewed by: freqlabs Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27093
This commit is contained in:
parent
d75d26dc8c
commit
b1e4826f3c
@ -28,7 +28,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd May 23, 2009
|
||||
.Dd December 17, 2020
|
||||
.Dt VFS_QUOTACTL 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -39,7 +39,7 @@
|
||||
.In sys/mount.h
|
||||
.In sys/vnode.h
|
||||
.Ft int
|
||||
.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "caddr_t arg"
|
||||
.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "void *arg"
|
||||
.Sh DESCRIPTION
|
||||
Implement file system quotas.
|
||||
See
|
||||
|
@ -1903,7 +1903,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
savuid = p->p_cred->p_ruid;
|
||||
p->p_cred->p_ruid = cred->cr_uid;
|
||||
if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA,
|
||||
USRQUOTA), cred->cr_uid, (caddr_t)&dqb))
|
||||
USRQUOTA), cred->cr_uid, &dqb))
|
||||
freenum = min(dqb.dqb_bhardlimit, freenum);
|
||||
p->p_cred->p_ruid = savuid;
|
||||
#endif /* QUOTA */
|
||||
@ -1932,7 +1932,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
savuid = p->p_cred->p_ruid;
|
||||
p->p_cred->p_ruid = cred->cr_uid;
|
||||
if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA,
|
||||
USRQUOTA), cred->cr_uid, (caddr_t)&dqb))
|
||||
USRQUOTA), cred->cr_uid, &dqb))
|
||||
freenum = min(dqb.dqb_bsoftlimit, freenum);
|
||||
p->p_cred->p_ruid = savuid;
|
||||
#endif /* QUOTA */
|
||||
@ -1958,7 +1958,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
savuid = p->p_cred->p_ruid;
|
||||
p->p_cred->p_ruid = cred->cr_uid;
|
||||
if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA,
|
||||
USRQUOTA), cred->cr_uid, (caddr_t)&dqb))
|
||||
USRQUOTA), cred->cr_uid, &dqb))
|
||||
freenum = dqb.dqb_curblocks;
|
||||
p->p_cred->p_ruid = savuid;
|
||||
#endif /* QUOTA */
|
||||
@ -2704,7 +2704,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
|
||||
savuid = p->p_cred->p_ruid;
|
||||
p->p_cred->p_ruid = cred->cr_uid;
|
||||
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
|
||||
cred->cr_uid, (caddr_t)&dqb))
|
||||
cred->cr_uid, &dqb))
|
||||
freenum = min(dqb.dqb_isoftlimit-dqb.dqb_curinodes,
|
||||
freenum);
|
||||
p->p_cred->p_ruid = savuid;
|
||||
@ -2811,7 +2811,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
|
||||
savuid = p->p_cred->p_ruid;
|
||||
p->p_cred->p_ruid = cred->cr_uid;
|
||||
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
|
||||
cred->cr_uid, (caddr_t)&dqb))
|
||||
cred->cr_uid, &dqb))
|
||||
freenum = min(dqb.dqb_bhardlimit, freenum);
|
||||
p->p_cred->p_ruid = savuid;
|
||||
#endif /* QUOTA */
|
||||
@ -2835,7 +2835,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
|
||||
savuid = p->p_cred->p_ruid;
|
||||
p->p_cred->p_ruid = cred->cr_uid;
|
||||
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
|
||||
cred->cr_uid, (caddr_t)&dqb))
|
||||
cred->cr_uid, &dqb))
|
||||
freenum = min(dqb.dqb_bsoftlimit, freenum);
|
||||
p->p_cred->p_ruid = savuid;
|
||||
#endif /* QUOTA */
|
||||
@ -2856,7 +2856,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
|
||||
savuid = p->p_cred->p_ruid;
|
||||
p->p_cred->p_ruid = cred->cr_uid;
|
||||
if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
|
||||
cred->cr_uid, (caddr_t)&dqb))
|
||||
cred->cr_uid, &dqb))
|
||||
freenum = dqb.dqb_curblocks;
|
||||
p->p_cred->p_ruid = savuid;
|
||||
#endif /* QUOTA */
|
||||
|
Loading…
Reference in New Issue
Block a user