diff options
author | kib <kib@FreeBSD.org> | 2015-01-04 00:46:06 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-01-04 00:46:06 +0000 |
commit | 511130787fe28fb9da8b2e64c39d0bc3742b9eff (patch) | |
tree | 1a3c2378ff40eaf9fc2c05de98b60d68f9001074 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | |
parent | 109bfbf650e0280709d4219ab02f754fa6e51a44 (diff) | |
download | FreeBSD-src-511130787fe28fb9da8b2e64c39d0bc3742b9eff.zip FreeBSD-src-511130787fe28fb9da8b2e64c39d0bc3742b9eff.tar.gz |
MFC r276007:
Handle MAKEENTRY cnp flag in the VOP_CREATE().
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 8c3a910..6749e9f 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -6155,15 +6155,20 @@ zfs_freebsd_create(ap) { struct componentname *cnp = ap->a_cnp; vattr_t *vap = ap->a_vap; - int mode; + int error, mode; ASSERT(cnp->cn_flags & SAVENAME); vattr_init_mask(vap); mode = vap->va_mode & ALLPERMS; - return (zfs_create(ap->a_dvp, cnp->cn_nameptr, vap, !EXCL, mode, - ap->a_vpp, cnp->cn_cred, cnp->cn_thread)); + error = zfs_create(ap->a_dvp, cnp->cn_nameptr, vap, !EXCL, mode, + ap->a_vpp, cnp->cn_cred, cnp->cn_thread); +#ifdef FREEBSD_NAMECACHE + if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0) + cache_enter(ap->a_dvp, *ap->a_vpp, cnp); +#endif + return (error); } static int |