summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-01-01 10:44:20 +0000
committerkib <kib@FreeBSD.org>2015-01-01 10:44:20 +0000
commita355201d21e09aeb2af52ffd0c14f90c6c9f338b (patch)
treea2f3efb3e775ec1f6c79f59d8d5d807106d8256b /sys/fs/unionfs
parent366f16dd6a08d1eeca56a868ab58114d5d5d2069 (diff)
downloadFreeBSD-src-a355201d21e09aeb2af52ffd0c14f90c6c9f338b.zip
FreeBSD-src-a355201d21e09aeb2af52ffd0c14f90c6c9f338b.tar.gz
MFC r275897:
Set NOCACHE flag for CREATE namei() calls, do not specially handle MAKEENTRY in VOP_LOOKUP().
Diffstat (limited to 'sys/fs/unionfs')
-rw-r--r--sys/fs/unionfs/union_subr.c2
-rw-r--r--sys/fs/unionfs/union_vnops.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
index e3391a7..74192dc 100644
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -536,6 +536,8 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp,
cn->cn_flags |= (cnp->cn_flags & (DOWHITEOUT | SAVESTART));
else if (RENAME == nameiop)
cn->cn_flags |= (cnp->cn_flags & SAVESTART);
+ else if (nameiop == CREATE)
+ cn->cn_flags |= NOCACHE;
vref(dvp);
VOP_UNLOCK(dvp, LK_RELEASE);
diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c
index 5076f16..6b60dbd 100644
--- a/sys/fs/unionfs/union_vnops.c
+++ b/sys/fs/unionfs/union_vnops.c
@@ -160,8 +160,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap)
LK_RETRY);
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
- } else if (error == ENOENT && (cnflags & MAKEENTRY) &&
- nameiop != CREATE)
+ } else if (error == ENOENT && (cnflags & MAKEENTRY) != 0)
cache_enter(dvp, NULLVP, cnp);
UNIONFS_INTERNAL_DEBUG("unionfs_lookup: leave (%d)\n", error);
@@ -337,7 +336,7 @@ unionfs_lookup_out:
if (lvp != NULLVP)
vrele(lvp);
- if (error == ENOENT && (cnflags & MAKEENTRY) && nameiop != CREATE)
+ if (error == ENOENT && (cnflags & MAKEENTRY) != 0)
cache_enter(dvp, NULLVP, cnp);
UNIONFS_INTERNAL_DEBUG("unionfs_lookup: leave (%d)\n", error);
OpenPOWER on IntegriCloud