diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-02-14 11:57:57 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-02-14 11:57:57 +0000 |
commit | 32cedb1cbd7fcf90a31d1ae5da80396e3f6a56ee (patch) | |
tree | 30aa2716772db24338c6c8dcc63d18221f39d134 /sys | |
parent | b6855876e0e22995536957b5e92f56e0ed265acb (diff) |
The v_inflight counter was added to mark vnodes that currently do an operation
that modifies the filesystem as inflight. This is used in the sync calls (on
suspend and hibernate) to mark filesystems clean if no work is in flight.
VOP_UNLOCK() also got the v_inflight dance but VOP_UNLOCK does not alter
filesystem space and so it does not matter if VOP_UNLOCK() is currently run.
Also VOP_UNLOCK() does not sleep so there is no way for the sync code to see
an inflight VOP_UNLOCK().
OK visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_vops.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/kern/vfs_vops.c b/sys/kern/vfs_vops.c index e69b078afb1..baf9db729cb 100644 --- a/sys/kern/vfs_vops.c +++ b/sys/kern/vfs_vops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vops.c,v 1.24 2020/02/13 08:47:10 claudio Exp $ */ +/* $OpenBSD: vfs_vops.c,v 1.25 2020/02/14 11:57:56 claudio Exp $ */ /* * Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org> * @@ -605,17 +605,13 @@ VOP_LOCK(struct vnode *vp, int flags) int VOP_UNLOCK(struct vnode *vp) { - int r; struct vop_unlock_args a; a.a_vp = vp; if (vp->v_op->vop_unlock == NULL) return (EOPNOTSUPP); - vp->v_inflight++; - r = (vp->v_op->vop_unlock)(&a); - vp->v_inflight--; - return r; + return ((vp->v_op->vop_unlock)(&a)); } int |