summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index ce2d701..d4b60f1 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -245,8 +245,11 @@ restart:
if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0)
goto bad;
- if (fmode & FWRITE)
+ if (fmode & FWRITE) {
vp->v_writecount++;
+ CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d",
+ __func__, vp, vp->v_writecount);
+ }
*flagp = fmode;
ASSERT_VOP_LOCKED(vp, "vn_open_cred");
if (!mpsafe)
@@ -309,6 +312,8 @@ vn_close(vp, flags, file_cred, td)
VNASSERT(vp->v_writecount > 0, vp,
("vn_close: negative writecount"));
vp->v_writecount--;
+ CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d",
+ __func__, vp, vp->v_writecount);
}
error = VOP_CLOSE(vp, flags, file_cred, td);
vput(vp);
OpenPOWER on IntegriCloud