Skip to content

Commit 115216c

Browse files
authored
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
1 parent d1e4ded commit 115216c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

module/os/freebsd/zfs/zfs_vnops_os.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,6 +1755,16 @@ zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp,
17551755
return (0);
17561756
}
17571757

1758+
#if __FreeBSD_version < 1300124
1759+
static void
1760+
cache_vop_rmdir(struct vnode *dvp, struct vnode *vp)
1761+
{
1762+
1763+
cache_purge(dvp);
1764+
cache_purge(vp);
1765+
}
1766+
#endif
1767+
17581768
/*
17591769
* Remove a directory subdir entry. If the current working
17601770
* 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)
18141824
return (error);
18151825
}
18161826

1817-
cache_purge(dvp);
1818-
18191827
error = zfs_link_destroy(dzp, name, zp, tx, ZEXISTS, NULL);
18201828

18211829
if (error == 0) {
@@ -1826,7 +1834,7 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
18261834

18271835
dmu_tx_commit(tx);
18281836

1829-
cache_purge(vp);
1837+
cache_vop_rmdir(dvp, vp);
18301838
out:
18311839
if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
18321840
zil_commit(zilog, 0);
@@ -3362,9 +3370,9 @@ zfs_rename_check(znode_t *szp, znode_t *sdzp, znode_t *tdzp)
33623370
return (error);
33633371
}
33643372

3365-
#if __FreeBSD_version < 1300110
3373+
#if __FreeBSD_version < 1300124
33663374
static void
3367-
cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp,
3375+
cache_vop_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp,
33683376
struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp)
33693377
{
33703378

@@ -3633,7 +3641,7 @@ zfs_rename_(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
36333641
}
36343642
}
36353643
if (error == 0) {
3636-
cache_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp);
3644+
cache_vop_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp);
36373645
}
36383646
}
36393647

0 commit comments

Comments
 (0)