OpenZFS 6637 - replacing "dontclose" with "should_close"
Authored by: David Schwartz <dschwartz783@gmail.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> I find that this is a lot easier to read. "not don't close" is somewhat tough on the eyes. OpenZFS-issue: https://www.illumos.org/issues/6637 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d189620 Closes #5572
This commit is contained in:
parent
e9aa730c49
commit
5727b00e06
@ -92,7 +92,7 @@ static int
|
||||
zfs_callback(zfs_handle_t *zhp, void *data)
|
||||
{
|
||||
callback_data_t *cb = data;
|
||||
boolean_t dontclose = B_FALSE;
|
||||
boolean_t should_close = B_TRUE;
|
||||
boolean_t include_snaps = zfs_include_snapshots(zhp, cb);
|
||||
boolean_t include_bmarks = (cb->cb_types & ZFS_TYPE_BOOKMARK);
|
||||
|
||||
@ -120,7 +120,7 @@ zfs_callback(zfs_handle_t *zhp, void *data)
|
||||
}
|
||||
}
|
||||
uu_avl_insert(cb->cb_avl, node, idx);
|
||||
dontclose = B_TRUE;
|
||||
should_close = B_FALSE;
|
||||
} else {
|
||||
free(node);
|
||||
}
|
||||
@ -146,7 +146,7 @@ zfs_callback(zfs_handle_t *zhp, void *data)
|
||||
cb->cb_depth--;
|
||||
}
|
||||
|
||||
if (!dontclose)
|
||||
if (should_close)
|
||||
zfs_close(zhp);
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user