Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107082969
D43817.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
D43817.diff
View Options
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -348,7 +348,8 @@
if ((ump->um_lowermp->mnt_flag & MNT_LOCAL) != 0 &&
(ump->um_uppermp->mnt_flag & MNT_LOCAL) != 0)
mp->mnt_flag |= MNT_LOCAL;
- mp->mnt_kern_flag |= MNTK_NOMSYNC | MNTK_UNIONFS;
+ mp->mnt_kern_flag |= MNTK_NOMSYNC | MNTK_UNIONFS |
+ (ump->um_uppermp->mnt_kern_flag & MNTK_SHARED_WRITES);
MNT_IUNLOCK(mp);
/*
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -998,14 +998,22 @@
struct unionfs_node *unp;
struct unionfs_node_status *unsp;
struct vnode *ovp;
+ enum unionfs_lkupgrade lkstatus;
KASSERT_UNIONFS_VNODE(ap->a_vp);
unp = VTOUNIONFS(ap->a_vp);
+ lkstatus = unionfs_upgrade_lock(ap->a_vp);
+ if (lkstatus == UNIONFS_LKUPGRADE_DOOMED) {
+ unionfs_downgrade_lock(ap->a_vp, lkstatus);
+ return (ENOENT);
+ }
unionfs_get_node_status(unp, ap->a_td, &unsp);
ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp);
unionfs_tryrem_node_status(unp, unsp);
+ unionfs_downgrade_lock(ap->a_vp, lkstatus);
+
if (ovp == NULLVP)
return (EBADF);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 8:35 PM (16 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15746296
Default Alt Text
D43817.diff (1 KB)
Attached To
Mode
D43817: unionfs: upgrade the vnode lock during fsync() if necessary
Attached
Detach File
Event Timeline
Log In to Comment