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
This commit is contained in:
parent
4f3a0cfbde
commit
4a9b832a2a
@ -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
|
||||
|
@ -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 @@ vn_deallocate_impl(struct vnode *vp, off_t *offset, off_t *length, int flags,
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user