svn commit: r368744 - in head: share/man/man9 sys/fs/nfs
Brooks Davis
brooks at FreeBSD.org
Thu Dec 17 21:58:11 UTC 2020
Author: brooks
Date: Thu Dec 17 21:58:10 2020
New Revision: 368744
URL: https://svnweb.freebsd.org/changeset/base/368744
Log:
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
Modified:
head/share/man/man9/VFS_QUOTACTL.9
head/sys/fs/nfs/nfs_commonsubs.c
Modified: head/share/man/man9/VFS_QUOTACTL.9
==============================================================================
--- head/share/man/man9/VFS_QUOTACTL.9 Thu Dec 17 21:54:25 2020 (r368743)
+++ head/share/man/man9/VFS_QUOTACTL.9 Thu Dec 17 21:58:10 2020 (r368744)
@@ -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
Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c Thu Dec 17 21:54:25 2020 (r368743)
+++ head/sys/fs/nfs/nfs_commonsubs.c Thu Dec 17 21:58:10 2020 (r368744)
@@ -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
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
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
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
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 */
More information about the svn-src-head
mailing list