Page MenuHomeFreeBSD

D43817.diff
No OneTemporary

D43817.diff

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

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)

Event Timeline