SAVENAME and HASBUF namei flags have been abolished; update zfs to match.
This commit is contained in:
parent
3538a43f3a
commit
a2f7dda335
|
@ -474,7 +474,7 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
|
|||
}
|
||||
|
||||
cn.cn_cred = kcred;
|
||||
cn.cn_flags = SAVENAME;
|
||||
cn.cn_flags = 0;
|
||||
|
||||
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
|
||||
switch (txtype) {
|
||||
|
@ -563,7 +563,7 @@ zfs_replay_remove(zfsvfs_t *zfsvfs, lr_remove_t *lr, boolean_t byteswap)
|
|||
cn.cn_nameptr = name;
|
||||
cn.cn_namelen = strlen(name);
|
||||
cn.cn_nameiop = DELETE;
|
||||
cn.cn_flags = ISLASTCN | SAVENAME;
|
||||
cn.cn_flags = ISLASTCN;
|
||||
//cn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
|
||||
cn.cn_cred = kcred;
|
||||
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
|
||||
|
@ -615,7 +615,7 @@ zfs_replay_link(zfsvfs_t *zfsvfs, lr_link_t *lr, boolean_t byteswap)
|
|||
vflg |= FIGNORECASE;
|
||||
cn.cn_nameptr = name;
|
||||
cn.cn_cred = kcred;
|
||||
cn.cn_flags = SAVENAME;
|
||||
cn.cn_flags = 0;
|
||||
|
||||
vn_lock(ZTOV(dzp), LK_EXCLUSIVE | LK_RETRY);
|
||||
vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_RETRY);
|
||||
|
@ -659,7 +659,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
|
|||
scn.cn_nameptr = sname;
|
||||
scn.cn_namelen = strlen(sname);
|
||||
scn.cn_nameiop = DELETE;
|
||||
scn.cn_flags = ISLASTCN | SAVENAME;
|
||||
scn.cn_flags = ISLASTCN;
|
||||
// scn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
|
||||
scn.cn_cred = kcred;
|
||||
vn_lock(ZTOV(sdzp), LK_EXCLUSIVE | LK_RETRY);
|
||||
|
@ -672,7 +672,7 @@ zfs_replay_rename(zfsvfs_t *zfsvfs, lr_rename_t *lr, boolean_t byteswap)
|
|||
tcn.cn_nameptr = tname;
|
||||
tcn.cn_namelen = strlen(tname);
|
||||
tcn.cn_nameiop = RENAME;
|
||||
tcn.cn_flags = ISLASTCN | SAVENAME;
|
||||
tcn.cn_flags = ISLASTCN;
|
||||
// tcn.cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
|
||||
tcn.cn_cred = kcred;
|
||||
vn_lock(ZTOV(tdzp), LK_EXCLUSIVE | LK_RETRY);
|
||||
|
|
|
@ -1331,13 +1331,10 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp,
|
|||
case RENAME:
|
||||
if (error == ENOENT) {
|
||||
error = EJUSTRETURN;
|
||||
cnp->cn_flags |= SAVENAME;
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case DELETE:
|
||||
if (error == 0)
|
||||
cnp->cn_flags |= SAVENAME;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4863,8 +4860,6 @@ zfs_netbsd_create(struct vop_create_args *ap)
|
|||
vattr_t *vap = ap->a_vap;
|
||||
int mode;
|
||||
|
||||
ASSERT(cnp->cn_flags & SAVENAME);
|
||||
|
||||
vattr_init_mask(vap);
|
||||
mode = vap->va_mode & ALLPERMS;
|
||||
|
||||
|
@ -4876,8 +4871,6 @@ static int
|
|||
zfs_netbsd_remove(struct vop_remove_args *ap)
|
||||
{
|
||||
|
||||
ASSERT(ap->a_cnp->cn_flags & SAVENAME);
|
||||
|
||||
return (zfs_remove(ap->a_dvp, (char *)ap->a_cnp->cn_nameptr,
|
||||
ap->a_cnp->cn_cred, NULL, 0));
|
||||
}
|
||||
|
@ -4887,8 +4880,6 @@ zfs_netbsd_mkdir(struct vop_mkdir_args *ap)
|
|||
{
|
||||
vattr_t *vap = ap->a_vap;
|
||||
|
||||
ASSERT(ap->a_cnp->cn_flags & SAVENAME);
|
||||
|
||||
vattr_init_mask(vap);
|
||||
|
||||
return (zfs_mkdir(ap->a_dvp, (char *)ap->a_cnp->cn_nameptr, vap, ap->a_vpp,
|
||||
|
@ -4900,8 +4891,6 @@ zfs_netbsd_rmdir(struct vop_rmdir_args *ap)
|
|||
{
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
|
||||
ASSERT(cnp->cn_flags & SAVENAME);
|
||||
|
||||
return (zfs_rmdir(ap->a_dvp, (char *)cnp->cn_nameptr, NULL, cnp->cn_cred, NULL, 0));
|
||||
}
|
||||
|
||||
|
@ -5053,8 +5042,8 @@ zfs_netbsd_rename(ap)
|
|||
vnode_t *tvp = ap->a_tvp;
|
||||
int error;
|
||||
|
||||
ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART));
|
||||
ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART));
|
||||
ASSERT(ap->a_fcnp->cn_flags & SAVESTART);
|
||||
ASSERT(ap->a_tcnp->cn_flags & SAVESTART);
|
||||
|
||||
error = zfs_rename(fdvp, (char *)ap->a_fcnp->cn_nameptr, tdvp,
|
||||
(char *)ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0);
|
||||
|
@ -5077,8 +5066,6 @@ zfs_netbsd_symlink(struct vop_symlink_args *ap)
|
|||
struct componentname *cnp = ap->a_cnp;
|
||||
vattr_t *vap = ap->a_vap;
|
||||
|
||||
ASSERT(cnp->cn_flags & SAVENAME);
|
||||
|
||||
vap->va_type = VLNK; /* Netbsd: Syscall only sets va_mode. */
|
||||
vattr_init_mask(vap);
|
||||
|
||||
|
@ -5264,8 +5251,6 @@ zfs_netbsd_link(struct vop_link_args *ap)
|
|||
{
|
||||
struct componentname *cnp = ap->a_cnp;
|
||||
|
||||
ASSERT(cnp->cn_flags & SAVENAME);
|
||||
|
||||
return (zfs_link(ap->a_dvp, ap->a_vp, (char *)cnp->cn_nameptr, cnp->cn_cred, NULL, 0));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue