Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107036417
D43816.id134098.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43816.id134098.diff
View Options
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
@@ -5830,7 +5830,22 @@
{
if (vp->v_type == VCHR)
;
- else if (MNT_EXTENDED_SHARED(vp->v_mount))
+ /*
+ * The shared vs. exclusive locking policy for fsync()
+ * is actually determined by vp's write mount as indicated
+ * by VOP_GETWRITEMOUNT(), which for stacked filesystems
+ * may not be the same as vp->v_mount. However, if the
+ * underlying filesystem which really handles the fsync()
+ * supports shared locking, the stacked filesystem must also
+ * be prepared for its VOP_FSYNC() operation to be called
+ * with only a shared lock. On the other hand, if the
+ * stacked filesystem claims support for shared write
+ * locking but the underlying filesystem does not, and the
+ * caller incorrectly uses a shared lock, this condition
+ * 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);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 7:57 AM (3 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15740872
Default Alt Text
D43816.id134098.diff (1 KB)
Attached To
Mode
D43816: VFS: update VOP_FSYNC() debug check to reflect actual locking policy
Attached
Detach File
Event Timeline
Log In to Comment