The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=4a9b832a2ad7acafaa16c858ab6e517f2fd83a0c
commit 4a9b832a2ad7acafaa16c858ab6e517f2fd83a0c Author: Ka Ho Ng <k...@freebsd.org> AuthorDate: 2021-08-11 09:45:47 +0000 Commit: Ka Ho Ng <k...@freebsd.org> CommitDate: 2021-08-11 09:45:47 +0000 vfs: Rename ioflg to ioflag in vn_deallocate This includes a style fix around ioflag checking as well. Sponsored by: The FreeBSD Foundation Reviewed by: kib, bcr Differential Revision: https://reviews.freebsd.org/D31505 --- share/man/man9/vn_deallocate.9 | 8 ++++---- sys/kern/vfs_vnops.c | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/share/man/man9/vn_deallocate.9 b/share/man/man9/vn_deallocate.9 index 415a8941ca68..60bcb9049e40 100644 --- a/share/man/man9/vn_deallocate.9 +++ b/share/man/man9/vn_deallocate.9 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Jul 30, 2021 +.Dd August 11, 2021 .Dt VN_DEALLOCATE 9 .Os .Sh NAME @@ -42,7 +42,7 @@ .Fa "off_t *offset" .Fa "off_t *length" .Fa "int flags" -.Fa "int ioflg" +.Fa "int ioflag" .Fa "struct ucred *active_cred" .Fa "struct ucred *file_cred" .Fc @@ -66,7 +66,7 @@ This must be greater than 0. .It Fa flags The control flags of the operation. This should be set to 0 for now. -.It Fa ioflg +.It Fa ioflag The control flags of vnode locking. .It Fa active_cred The user credentials of the calling thread. @@ -75,7 +75,7 @@ The credentials installed on the file description pointing to the vnode or NOCRE .El .Pp The -.Fn ioflg +.Fn ioflag argument may be one or more of the following flags: .Bl -tag -width IO_RANGELOCKED .It Dv IO_NODELOCKED diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 832ade5d800e..015a13c1c385 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3447,7 +3447,7 @@ vn_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td) static int vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, - int ioflg, struct ucred *active_cred, struct ucred *file_cred) + int ioflag, struct ucred *active_cred, struct ucred *file_cred) { struct mount *mp; void *rl_cookie; @@ -3463,7 +3463,7 @@ vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, off = *offset; len = *length; - if ((ioflg & (IO_NODELOCKED|IO_RANGELOCKED)) == 0) + if ((ioflag & (IO_NODELOCKED | IO_RANGELOCKED)) == 0) rl_cookie = vn_rangelock_wlock(vp, off, off + len); while (len > 0 && error == 0) { /* @@ -3473,7 +3473,7 @@ vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, * pass. */ - if ((ioflg & IO_NODELOCKED) == 0) { + if ((ioflag & IO_NODELOCKED) == 0) { bwillwrite(); if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) @@ -3488,7 +3488,7 @@ vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, #endif #ifdef MAC - if ((ioflg & IO_NOMACCHECK) == 0) + if ((ioflag & IO_NOMACCHECK) == 0) error = mac_vnode_check_write(active_cred, file_cred, vp); #endif @@ -3496,7 +3496,7 @@ vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags, error = VOP_DEALLOCATE(vp, &off, &len, flags, active_cred); - if ((ioflg & IO_NODELOCKED) == 0) { + if ((ioflag & IO_NODELOCKED) == 0) { VOP_UNLOCK(vp); if (mp != NULL) { vn_finished_write(mp); @@ -3514,7 +3514,7 @@ out: int vn_deallocate(struct vnode *vp, off_t *offset, off_t *length, int flags, - int ioflg, struct ucred *active_cred, struct ucred *file_cred) + int ioflag, struct ucred *active_cred, struct ucred *file_cred) { if (*offset < 0 || *length <= 0 || *length > OFF_MAX - *offset || flags != 0) @@ -3522,7 +3522,7 @@ vn_deallocate(struct vnode *vp, off_t *offset, off_t *length, int flags, if (vp->v_type != VREG) return (ENODEV); - return (vn_deallocate_impl(vp, offset, length, flags, ioflg, + return (vn_deallocate_impl(vp, offset, length, flags, ioflag, active_cred, file_cred)); } _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"