summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Guzik <[email protected]>2020-10-30 23:22:04 +0100
committerGitHub <[email protected]>2020-10-30 15:22:04 -0700
commit115216cc9290d54e8c12d2f5d858f1ec082ad657 (patch)
treeb2212ae77e09346853d65216106f2de7719fed43
parentd1e4ded7bc69c2805e42ee06d76e0f541214a41f (diff)
FreeBSD: catch up with 1300124 version bump
- use cache_vop_mkdir - cache_rename -> cache_vop_rename Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Matt Macy <[email protected]> Signed-off-by: Mateusz Guzik <[email protected]> Closes #11136
-rw-r--r--module/os/freebsd/zfs/zfs_vnops_os.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c
index 5c1389532..abb96f529 100644
--- a/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -1755,6 +1755,16 @@ zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp,
return (0);
}
+#if __FreeBSD_version < 1300124
+static void
+cache_vop_rmdir(struct vnode *dvp, struct vnode *vp)
+{
+
+ cache_purge(dvp);
+ cache_purge(vp);
+}
+#endif
+
/*
* Remove a directory subdir entry. If the current working
* directory is the same as the subdir to be removed, the
@@ -1814,8 +1824,6 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
return (error);
}
- cache_purge(dvp);
-
error = zfs_link_destroy(dzp, name, zp, tx, ZEXISTS, NULL);
if (error == 0) {
@@ -1826,7 +1834,7 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
dmu_tx_commit(tx);
- cache_purge(vp);
+ cache_vop_rmdir(dvp, vp);
out:
if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zilog, 0);
@@ -3362,9 +3370,9 @@ zfs_rename_check(znode_t *szp, znode_t *sdzp, znode_t *tdzp)
return (error);
}
-#if __FreeBSD_version < 1300110
+#if __FreeBSD_version < 1300124
static void
-cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp,
+cache_vop_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp,
struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp)
{
@@ -3633,7 +3641,7 @@ zfs_rename_(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
}
}
if (error == 0) {
- cache_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp);
+ cache_vop_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp);
}
}