Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD: catch up with 1300124 version bump #11136

Merged
merged 1 commit into from
Oct 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions module/os/freebsd/zfs/zfs_vnops_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
behlendorf marked this conversation as resolved.
Show resolved Hide resolved
out:
if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zilog, 0);
Expand Down Expand Up @@ -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)
{

Expand Down Expand Up @@ -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);
}
}

Expand Down