Add pn_alloc()/pn_free() functions

In order to remove the HAVE_PN_UTILS wrappers the pn_alloc() and
pn_free() functions must be implemented.  The existing illumos
implementation were used for this purpose.

The `flags` argument which was used in places wrapped by the
HAVE_PN_UTILS condition has beed added back to zfs_remove() and
zfs_link() functions.  This removes a small point of divergence
between the ZoL code and upstream.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4522
This commit is contained in:
Brian Behlendorf
2016-04-13 08:55:35 -07:00
parent 8fc5674c52
commit da5e151f20
10 changed files with 178 additions and 32 deletions
+2 -2
View File
@@ -548,7 +548,7 @@ zfs_replay_remove(zfs_sb_t *zsb, lr_remove_t *lr, boolean_t byteswap)
switch ((int)lr->lr_common.lrc_txtype) {
case TX_REMOVE:
error = zfs_remove(ZTOI(dzp), name, kcred);
error = zfs_remove(ZTOI(dzp), name, kcred, vflg);
break;
case TX_RMDIR:
error = zfs_rmdir(ZTOI(dzp), name, NULL, kcred, vflg);
@@ -584,7 +584,7 @@ zfs_replay_link(zfs_sb_t *zsb, lr_link_t *lr, boolean_t byteswap)
if (lr->lr_common.lrc_txtype & TX_CI)
vflg |= FIGNORECASE;
error = zfs_link(ZTOI(dzp), ZTOI(zp), name, kcred);
error = zfs_link(ZTOI(dzp), ZTOI(zp), name, kcred, vflg);
iput(ZTOI(zp));
iput(ZTOI(dzp));