Skip to content

Commit 6e4845a

Browse files
mjguzikbehlendorf
authored andcommitted
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 48cf7d6 commit 6e4845a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

module/os/freebsd/zfs/zfs_vnops.c

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

2276+
#if __FreeBSD_version < 1300124
2277+
static void
2278+
cache_vop_rmdir(struct vnode *dvp, struct vnode *vp)
2279+
{
2280+
2281+
cache_purge(dvp);
2282+
cache_purge(vp);
2283+
}
2284+
#endif
2285+
22762286
/*
22772287
* Remove a directory subdir entry. If the current working
22782288
* directory is the same as the subdir to be removed, the
@@ -2332,8 +2342,6 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
23322342
return (error);
23332343
}
23342344

2335-
cache_purge(dvp);
2336-
23372345
error = zfs_link_destroy(dzp, name, zp, tx, ZEXISTS, NULL);
23382346

23392347
if (error == 0) {
@@ -2344,7 +2352,7 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
23442352

23452353
dmu_tx_commit(tx);
23462354

2347-
cache_purge(vp);
2355+
cache_vop_rmdir(dvp, vp);
23482356
out:
23492357
if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
23502358
zil_commit(zilog, 0);
@@ -3901,9 +3909,9 @@ zfs_rename_check(znode_t *szp, znode_t *sdzp, znode_t *tdzp)
39013909
return (error);
39023910
}
39033911

3904-
#if __FreeBSD_version < 1300110
3912+
#if __FreeBSD_version < 1300124
39053913
static void
3906-
cache_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp,
3914+
cache_vop_rename(struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp,
39073915
struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp)
39083916
{
39093917

@@ -4172,7 +4180,7 @@ zfs_rename_(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
41724180
}
41734181
}
41744182
if (error == 0) {
4175-
cache_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp);
4183+
cache_vop_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp);
41764184
}
41774185
}
41784186

0 commit comments

Comments
 (0)