mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
Illumos #3006
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first
argument is zero
Reviewed by Matt Ahrens <matthew.ahrens@delphix.com>
Reviewed by George Wilson <george.wilson@delphix.com>
Approved by Eric Schrock <eric.schrock@delphix.com>
References:
illumos/illumos-gate@fb09f5aad4
https://illumos.org/issues/3006
Requires:
zfsonlinux/spl@1c6d149feb
Ported-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1509
This commit is contained in:
committed by
Brian Behlendorf
parent
9eaf0832ad
commit
c99c90015e
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
/* Portions Copyright 2007 Jeremy Teo */
|
||||
@@ -1523,7 +1524,7 @@ top:
|
||||
&xattr_obj, sizeof (xattr_obj));
|
||||
if (error == 0 && xattr_obj) {
|
||||
error = zfs_zget(zsb, xattr_obj, &xzp);
|
||||
ASSERT3U(error, ==, 0);
|
||||
ASSERT0(error);
|
||||
dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
|
||||
dmu_tx_hold_sa(tx, xzp->z_sa_hdl, B_FALSE);
|
||||
}
|
||||
@@ -2837,7 +2838,7 @@ top:
|
||||
zp->z_mode = new_mode;
|
||||
ASSERT3P(aclp, !=, NULL);
|
||||
err = zfs_aclset_common(zp, aclp, cr, tx);
|
||||
ASSERT3U(err, ==, 0);
|
||||
ASSERT0(err);
|
||||
if (zp->z_acl_cached)
|
||||
zfs_acl_free(zp->z_acl_cached);
|
||||
zp->z_acl_cached = aclp;
|
||||
@@ -3346,7 +3347,7 @@ top:
|
||||
|
||||
error = sa_update(szp->z_sa_hdl, SA_ZPL_FLAGS(zsb),
|
||||
(void *)&szp->z_pflags, sizeof (uint64_t), tx);
|
||||
ASSERT3U(error, ==, 0);
|
||||
ASSERT0(error);
|
||||
|
||||
error = zfs_link_destroy(sdl, szp, tx, ZRENAMING, NULL);
|
||||
if (error == 0) {
|
||||
|
||||
Reference in New Issue
Block a user