From owner-dev-commits-src-all@freebsd.org Wed Aug 11 09:46:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D34E165094E; Wed, 11 Aug 2021 09:46:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gl4hq5JVhz4jFw; Wed, 11 Aug 2021 09:46:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C9EB5130; Wed, 11 Aug 2021 09:46:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17B9kZJP008827; Wed, 11 Aug 2021 09:46:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17B9kZRV008826; Wed, 11 Aug 2021 09:46:35 GMT (envelope-from git) Date: Wed, 11 Aug 2021 09:46:35 GMT Message-Id: <202108110946.17B9kZRV008826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 4a9b832a2ad7 - main - vfs: Rename ioflg to ioflag in vn_deallocate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a9b832a2ad7acafaa16c858ab6e517f2fd83a0c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2021 09:46:35 -0000 The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=4a9b832a2ad7acafaa16c858ab6e517f2fd83a0c commit 4a9b832a2ad7acafaa16c858ab6e517f2fd83a0c Author: Ka Ho Ng AuthorDate: 2021-08-11 09:45:47 +0000 Commit: Ka Ho Ng 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)); }