Skip to content

Commit

Permalink
Simplify the code: remove redundant variables.
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Jakub Dawidek <[email protected]>
  • Loading branch information
pjd committed Nov 8, 2024
1 parent 236badf commit 8a62892
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions module/os/freebsd/zfs/zfs_vnops_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,6 @@ zfs_remove_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
uint64_t obj = 0;
dmu_tx_t *tx;
boolean_t unlinked;
uint64_t txtype;
int error;


Expand Down Expand Up @@ -1212,8 +1211,7 @@ zfs_remove_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)
vp->v_vflag |= VV_NOSYNC;
}
/* XXX check changes to linux vnops */
txtype = TX_REMOVE;
zfs_log_remove(zilog, tx, txtype, dzp, name, obj, unlinked);
zfs_log_remove(zilog, tx, TX_REMOVE, dzp, name, obj, unlinked);

dmu_tx_commit(tx);
out:
Expand Down Expand Up @@ -1534,8 +1532,7 @@ zfs_rmdir_(vnode_t *dvp, vnode_t *vp, const char *name, cred_t *cr)

error = zfs_link_destroy(dzp, name, zp, tx, ZEXISTS, NULL);
if (error == 0) {
uint64_t txtype = TX_RMDIR;
zfs_log_remove(zilog, tx, txtype, dzp, name,
zfs_log_remove(zilog, tx, TX_RMDIR, dzp, name,
ZFS_NO_OBJECT, B_FALSE);
}

Expand Down Expand Up @@ -3436,7 +3433,6 @@ zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
int error;
zfs_acl_ids_t acl_ids;
boolean_t fuid_dirtied;
uint64_t txtype = TX_SYMLINK;

ASSERT3S(vap->va_type, ==, VLNK);

Expand Down Expand Up @@ -3543,7 +3539,7 @@ zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
VOP_UNLOCK(ZTOV(zp));
zrele(zp);
} else {
zfs_log_symlink(zilog, tx, txtype, dzp, zp, name, link);
zfs_log_symlink(zilog, tx, TX_SYMLINK, dzp, zp, name, link);
}

zfs_acl_ids_free(&acl_ids);
Expand Down

0 comments on commit 8a62892

Please sign in to comment.