Add "void *extra" argument to vcache_new() so a file system may

pass more information about the file to create.

Welcome to 8.99.30
This commit is contained in:
hannken 2019-01-01 10:06:54 +00:00
parent 109abe694c
commit b689ec0f78
19 changed files with 75 additions and 63 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vfsops.9,v 1.48 2017/07/03 21:28:48 wiz Exp $
.\" $NetBSD: vfsops.9,v 1.49 2019/01/01 10:06:54 hannken Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 12, 2015
.Dd January 1, 2019
.Dt VFSOPS 9
.Os
.Sh NAME
@ -72,7 +72,7 @@
.Ft int
.Fn VFS_LOADVNODE "struct mount *mp" "struct vnode *vp" "const void *key" "size_t key_len" "const void **new_key"
.Ft int
.Fn VFS_NEWVNODE "struct mount *mp" "struct vnode *dvp" "struct vnode *vp" "struct vattr *vap" "kauth_cred_t cred" "size_t *key_len" "const void **new_key"
.Fn VFS_NEWVNODE "struct mount *mp" "struct vnode *dvp" "struct vnode *vp" "struct vattr *vap" "kauth_cred_t cred" "void *extra" "size_t *key_len" "const void **new_key"
.Ft int
.Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "struct vnode **vpp"
.Ft int
@ -378,6 +378,10 @@ The argument
.Fa cred
holds the credentials for the file to create.
.Pp
The argument
.Fa extra
allows the caller to pass more information about the file to create.
.Pp
The key for the file is returned in the addresses specified by
.Fa key_len
and

View File

@ -1,4 +1,4 @@
.\" $NetBSD: vnode.9,v 1.81 2017/07/03 21:28:48 wiz Exp $
.\" $NetBSD: vnode.9,v 1.82 2019/01/01 10:06:54 hannken Exp $
.\"
.\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd May 28, 2017
.Dd January 1, 2019
.Dt VNODE 9
.Os
.Sh NAME
@ -76,7 +76,7 @@
.Ft int
.Fn vcache_get "struct mount *mp" "const void *key" "size_t key_len" "struct vnode **vpp"
.Ft int
.Fn vcache_new "struct mount *mp" "struct vnode *dvp" "struct vattr *vap" "kauth_cred_t cred" "struct vnode **vpp"
.Fn vcache_new "struct mount *mp" "struct vnode *dvp" "struct vattr *vap" "kauth_cred_t cred" "void *extra" "struct vnode **vpp"
.Ft int
.Fn vcache_rekey_enter "struct mount *mp" "struct vnode *vp" "const void *old_key" "size_t old_key_len" "const void *new_key" "size_t new_key_len"
.Ft void
@ -578,6 +578,10 @@ The argument
.Fa cred
holds the credentials for the file to create.
.Pp
The argument
.Fa extra
allows the caller to pass more information about the file to create.
.Pp
If a vnode is successfully created zero is returned, otherwise an
appropriate error code is returned.
.It Fn vcache_rekey_enter "mp" "vp" "old_key" "old_key_len" "new_key" "new_key_len"

View File

@ -1,4 +1,4 @@
/* $NetBSD: tmpfs_subr.c,v 1.103 2018/05/28 21:04:35 chs Exp $ */
/* $NetBSD: tmpfs_subr.c,v 1.104 2019/01/01 10:06:54 hannken Exp $ */
/*
* Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.103 2018/05/28 21:04:35 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.104 2019/01/01 10:06:54 hannken Exp $");
#include <sys/param.h>
#include <sys/cprng.h>
@ -177,7 +177,7 @@ tmpfs_loadvnode(struct mount *mp, struct vnode *vp,
*/
int
tmpfs_newvnode(struct mount *mp, struct vnode *dvp, struct vnode *vp,
struct vattr *vap, kauth_cred_t cred,
struct vattr *vap, kauth_cred_t cred, void *extra,
size_t *key_len, const void **new_key)
{
tmpfs_mount_t *tmp = VFS_TO_TMPFS(mp);
@ -390,7 +390,7 @@ tmpfs_construct_node(vnode_t *dvp, vnode_t **vpp, struct vattr *vap,
}
/* Allocate a vnode that represents the new file. */
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, vpp);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, NULL, vpp);
if (error) {
if (slink != NULL)
tmpfs_strname_free(tmp, slink, ssize);

View File

@ -1,4 +1,4 @@
/* $NetBSD: tmpfs_vfsops.c,v 1.73 2018/08/09 08:43:56 christos Exp $ */
/* $NetBSD: tmpfs_vfsops.c,v 1.74 2019/01/01 10:06:54 hannken Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.73 2018/08/09 08:43:56 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.74 2019/01/01 10:06:54 hannken Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -205,7 +205,7 @@ tmpfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
va.va_mode = args->ta_root_mode & ALLPERMS;
va.va_uid = args->ta_root_uid;
va.va_gid = args->ta_root_gid;
error = vcache_new(mp, NULL, &va, NOCRED, &vp);
error = vcache_new(mp, NULL, &va, NOCRED, NULL, &vp);
if (error) {
mp->mnt_data = NULL;
tmpfs_mntmem_destroy(tmp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf_subr.c,v 1.144 2018/10/14 17:37:40 jdolecek Exp $ */
/* $NetBSD: udf_subr.c,v 1.145 2019/01/01 10:06:54 hannken Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.144 2018/10/14 17:37:40 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.145 2019/01/01 10:06:54 hannken Exp $");
#endif /* not lint */
@ -5779,7 +5779,7 @@ udf_dispose_node(struct udf_node *udf_node)
int
udf_newvnode(struct mount *mp, struct vnode *dvp, struct vnode *vp,
struct vattr *vap, kauth_cred_t cred,
struct vattr *vap, kauth_cred_t cred, void *extra,
size_t *key_len, const void **new_key)
{
union dscrptr *dscr;
@ -5938,7 +5938,7 @@ udf_create_node(struct vnode *dvp, struct vnode **vpp, struct vattr *vap,
struct udf_mount *ump = dir_node->ump;
int error;
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, vpp);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, NULL, vpp);
if (error)
return error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_subr.c,v 1.470 2017/10/27 12:25:15 joerg Exp $ */
/* $NetBSD: vfs_subr.c,v 1.471 2019/01/01 10:06:54 hannken Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.470 2017/10/27 12:25:15 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.471 2019/01/01 10:06:54 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@ -351,7 +351,7 @@ bdevvp(dev_t dev, vnode_t **vpp)
va.va_type = VBLK;
va.va_rdev = dev;
return vcache_new(dead_rootmount, NULL, &va, NOCRED, vpp);
return vcache_new(dead_rootmount, NULL, &va, NOCRED, NULL, vpp);
}
/*
@ -367,7 +367,7 @@ cdevvp(dev_t dev, vnode_t **vpp)
va.va_type = VCHR;
va.va_rdev = dev;
return vcache_new(dead_rootmount, NULL, &va, NOCRED, vpp);
return vcache_new(dead_rootmount, NULL, &va, NOCRED, NULL, vpp);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_vnode.c,v 1.100 2017/09/22 06:05:20 joerg Exp $ */
/* $NetBSD: vfs_vnode.c,v 1.101 2019/01/01 10:06:54 hannken Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@ -156,7 +156,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.100 2017/09/22 06:05:20 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.101 2019/01/01 10:06:54 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -1375,7 +1375,7 @@ again:
*/
int
vcache_new(struct mount *mp, struct vnode *dvp, struct vattr *vap,
kauth_cred_t cred, struct vnode **vpp)
kauth_cred_t cred, void *extra, struct vnode **vpp)
{
int error;
uint32_t hash;
@ -1393,7 +1393,7 @@ vcache_new(struct mount *mp, struct vnode *dvp, struct vattr *vap,
vp = VIMPL_TO_VNODE(vip);
/* Create and load the fs node. */
error = VFS_NEWVNODE(mp, dvp, vp, vap, cred,
error = VFS_NEWVNODE(mp, dvp, vp, vap, cred, extra,
&vip->vi_key.vk_key_len, &vip->vi_key.vk_key);
if (error) {
mutex_enter(&vcache_lock);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dead_vfsops.c,v 1.8 2017/08/21 08:56:45 hannken Exp $ */
/* $NetBSD: dead_vfsops.c,v 1.9 2019/01/01 10:06:54 hannken Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dead_vfsops.c,v 1.8 2017/08/21 08:56:45 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: dead_vfsops.c,v 1.9 2019/01/01 10:06:54 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -92,7 +92,7 @@ dead_panic(void)
*/
int
dead_newvnode(struct mount *mp, struct vnode *dvp, struct vnode *vp,
struct vattr *vap, kauth_cred_t cred,
struct vattr *vap, kauth_cred_t cred, void *extra,
size_t *key_len, const void **new_key)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: mount.h,v 1.233 2018/12/10 21:19:33 jdolecek Exp $ */
/* $NetBSD: mount.h,v 1.234 2019/01/01 10:06:54 hannken Exp $ */
/*
* Copyright (c) 1989, 1991, 1993
@ -189,7 +189,7 @@ struct vfsops {
int (*vfs_loadvnode) (struct mount *, struct vnode *,
const void *, size_t, const void **);
int (*vfs_newvnode) (struct mount *, struct vnode *, struct vnode *,
struct vattr *, kauth_cred_t,
struct vattr *, kauth_cred_t, void *,
size_t *, const void **);
int (*vfs_fhtovp) (struct mount *, struct fid *,
struct vnode **);
@ -215,8 +215,9 @@ struct vfsops {
#define VFS_VGET(MP, INO, VPP) (*(MP)->mnt_op->vfs_vget)(MP, INO, VPP)
#define VFS_LOADVNODE(MP, VP, KEY, KEY_LEN, NEW_KEY) \
(*(MP)->mnt_op->vfs_loadvnode)(MP, VP, KEY, KEY_LEN, NEW_KEY)
#define VFS_NEWVNODE(MP, DVP, VP, VAP, CRED, NEW_LEN, NEW_KEY) \
(*(MP)->mnt_op->vfs_newvnode)(MP, DVP, VP, VAP, CRED, NEW_LEN, NEW_KEY)
#define VFS_NEWVNODE(MP, DVP, VP, VAP, CRED, EXTRA, NEW_LEN, NEW_KEY) \
(*(MP)->mnt_op->vfs_newvnode)(MP, DVP, VP, VAP, CRED, EXTRA, \
NEW_LEN, NEW_KEY)
#define VFS_RENAMELOCK_ENTER(MP) (*(MP)->mnt_op->vfs_renamelock_enter)(MP)
#define VFS_RENAMELOCK_EXIT(MP) (*(MP)->mnt_op->vfs_renamelock_exit)(MP)
@ -253,7 +254,7 @@ int fsname##_vget(struct mount *, ino_t, struct vnode **); \
int fsname##_loadvnode(struct mount *, struct vnode *, \
const void *, size_t, const void **); \
int fsname##_newvnode(struct mount *, struct vnode *, \
struct vnode *, struct vattr *, kauth_cred_t, \
struct vnode *, struct vattr *, kauth_cred_t, void *, \
size_t *, const void **); \
int fsname##_fhtovp(struct mount *, struct fid *, struct vnode **); \
int fsname##_vptofh(struct vnode *, struct fid *, size_t *); \

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.574 2018/12/24 16:58:54 thorpej Exp $ */
/* $NetBSD: param.h,v 1.575 2019/01/01 10:06:54 hannken Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -67,7 +67,7 @@
* 2.99.9 (299000900)
*/
#define __NetBSD_Version__ 899002900 /* NetBSD 8.99.29 */
#define __NetBSD_Version__ 899003000 /* NetBSD 8.99.30 */
#define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
(m) * 1000000) + (p) * 100) <= __NetBSD_Version__)

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnode.h,v 1.280 2018/04/19 21:19:07 christos Exp $ */
/* $NetBSD: vnode.h,v 1.281 2019/01/01 10:06:54 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -519,7 +519,7 @@ void vrevoke(struct vnode *);
void vremfree(struct vnode *);
int vcache_get(struct mount *, const void *, size_t, struct vnode **);
int vcache_new(struct mount *, struct vnode *,
struct vattr *, kauth_cred_t, struct vnode **);
struct vattr *, kauth_cred_t, void *, struct vnode **);
int vcache_rekey_enter(struct mount *, struct vnode *,
const void *, size_t, const void *, size_t);
void vcache_rekey_exit(struct mount *, struct vnode *,

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_vfsops.c,v 1.212 2018/12/10 14:46:24 maxv Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.213 2019/01/01 10:06:55 hannken Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.212 2018/12/10 14:46:24 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.213 2019/01/01 10:06:55 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -1075,7 +1075,7 @@ ext2fs_loadvnode(struct mount *mp, struct vnode *vp,
*/
int
ext2fs_newvnode(struct mount *mp, struct vnode *dvp, struct vnode *vp,
struct vattr *vap, kauth_cred_t cred,
struct vattr *vap, kauth_cred_t cred, void *extra,
size_t *key_len, const void **new_key)
{
ino_t ino;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_vnops.c,v 1.128 2017/05/28 16:38:55 hannken Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.129 2019/01/01 10:06:55 hannken Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.128 2017/05/28 16:38:55 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.129 2019/01/01 10:06:55 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1024,7 +1024,7 @@ ext2fs_makeinode(struct vattr *vap, struct vnode *dvp, struct vnode **vpp,
*vpp = NULL;
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, &tvp);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, NULL, &tvp);
if (error)
return error;
error = vn_lock(tvp, LK_EXCLUSIVE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vfsops.c,v 1.360 2018/12/10 19:29:41 jdolecek Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.361 2019/01/01 10:06:55 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.360 2018/12/10 19:29:41 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.361 2019/01/01 10:06:55 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -2091,7 +2091,7 @@ ffs_loadvnode(struct mount *mp, struct vnode *vp,
*/
int
ffs_newvnode(struct mount *mp, struct vnode *dvp, struct vnode *vp,
struct vattr *vap, kauth_cred_t cred,
struct vattr *vap, kauth_cred_t cred, void *extra,
size_t *key_len, const void **new_key)
{
ino_t ino;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_wapbl.c,v 1.43 2018/12/10 19:29:41 jdolecek Exp $ */
/* $NetBSD: ffs_wapbl.c,v 1.44 2019/01/01 10:06:55 hannken Exp $ */
/*-
* Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.43 2018/12/10 19:29:41 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.44 2019/01/01 10:06:55 hannken Exp $");
#define WAPBL_INTERNAL
@ -658,7 +658,7 @@ wapbl_create_infs_log(struct mount *mp, struct fs *fs, struct vnode *devvp,
va.va_type = VREG;
va.va_mode = 0;
error = vcache_new(mp, rvp, &va, NOCRED, &vp);
error = vcache_new(mp, rvp, &va, NOCRED, NULL, &vp);
vput(rvp);
if (error)
return error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_rfw.c,v 1.33 2018/12/10 14:46:25 maxv Exp $ */
/* $NetBSD: lfs_rfw.c,v 1.34 2019/01/01 10:06:55 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lfs_rfw.c,v 1.33 2018/12/10 14:46:25 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: lfs_rfw.c,v 1.34 2019/01/01 10:06:55 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@ -142,7 +142,8 @@ lfs_rf_valloc(struct lfs *fs, ino_t ino, int vers, struct lwp *l,
va.va_mode = 0;
va.va_fileid = ino;
va.va_gen = vers;
error = vcache_new(fs->lfs_ivnode->v_mount, NULL, &va, NOCRED, &vp);
error = vcache_new(fs->lfs_ivnode->v_mount, NULL, &va, NOCRED, NULL,
&vp);
if (error)
return error;
error = vn_lock(vp, LK_EXCLUSIVE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_vfsops.c,v 1.363 2018/12/10 14:46:25 maxv Exp $ */
/* $NetBSD: lfs_vfsops.c,v 1.364 2019/01/01 10:06:55 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.363 2018/12/10 14:46:25 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.364 2019/01/01 10:06:55 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@ -1755,7 +1755,7 @@ out:
*/
int
lfs_newvnode(struct mount *mp, struct vnode *dvp, struct vnode *vp,
struct vattr *vap, kauth_cred_t cred,
struct vattr *vap, kauth_cred_t cred, void *extra,
size_t *key_len, const void **new_key)
{
ino_t ino;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_vnops.c,v 1.322 2018/08/11 20:16:21 zafer Exp $ */
/* $NetBSD: lfs_vnops.c,v 1.323 2019/01/01 10:06:55 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.322 2018/08/11 20:16:21 zafer Exp $");
__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.323 2019/01/01 10:06:55 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -366,7 +366,7 @@ lfs_makeinode(struct vattr *vap, struct vnode *dvp,
struct vnode *tvp;
int error;
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, &tvp);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, NULL, &tvp);
if (error)
return error;
error = vn_lock(tvp, LK_EXCLUSIVE);
@ -977,7 +977,8 @@ lfs_mkdir(void *v)
* but not have it entered in the parent directory. The entry is
* made later after writing "." and ".." entries.
*/
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, ap->a_vpp);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, NULL,
ap->a_vpp);
if (error)
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ufs_vnops.c,v 1.241 2018/12/10 20:48:34 jdolecek Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.242 2019/01/01 10:06:55 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.241 2018/12/10 20:48:34 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.242 2019/01/01 10:06:55 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -935,7 +935,8 @@ ufs_mkdir(void *v)
* but not have it entered in the parent directory. The entry is
* made later after writing "." and ".." entries.
*/
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, ap->a_vpp);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, NULL,
ap->a_vpp);
if (error)
goto out;
error = vn_lock(*ap->a_vpp, LK_EXCLUSIVE);
@ -1783,7 +1784,7 @@ ufs_makeinode(struct vattr *vap, struct vnode *dvp,
UFS_WAPBL_JUNLOCK_ASSERT(dvp->v_mount);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, &tvp);
error = vcache_new(dvp->v_mount, dvp, vap, cnp->cn_cred, NULL, &tvp);
if (error)
return error;
error = vn_lock(tvp, LK_EXCLUSIVE);