Page MenuHomeFreeBSD

D51730.1785228550.diff
No OneTemporary

Size
745 B
Referenced Files
None
Subscribers
None

D51730.1785228550.diff

diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -5897,6 +5897,8 @@
static void
vop_fsync_debugprepost(struct vnode *vp, const char *name)
{
+ struct mount *mp;
+
if (vp->v_type == VCHR)
;
/*
@@ -5914,10 +5916,16 @@
* should still be caught when the stacked filesystem
* invokes VOP_FSYNC() on the underlying filesystem.
*/
- else if (MNT_SHARED_WRITES(vp->v_mount))
- ASSERT_VOP_LOCKED(vp, name);
- else
- ASSERT_VOP_ELOCKED(vp, name);
+ else {
+ mp = NULL;
+ VOP_GETWRITEMOUNT(vp, &mp);
+ if (vn_lktype_write(mp, vp) == LK_SHARED)
+ ASSERT_VOP_LOCKED(vp, name);
+ else
+ ASSERT_VOP_ELOCKED(vp, name);
+ if (mp != NULL)
+ vfs_rel(mp);
+ }
}
void

File Metadata

Mime Type
text/plain
Expires
Tue, Jul 28, 8:49 AM (7 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29288823
Default Alt Text
D51730.1785228550.diff (745 B)

Event Timeline