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 19, 2024
1 parent f20f80c commit 3c8a9b9
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 @@ -1123,7 +1123,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 @@ -1214,8 +1213,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 @@ -1536,8 +1534,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 @@ -3438,7 +3435,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 @@ -3545,7 +3541,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 3c8a9b9

Please sign in to comment.