summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/unicode/u8_textprep.c7
-rw-r--r--module/zfs/dnode.c2
-rw-r--r--module/zfs/dnode_sync.c2
-rw-r--r--module/zfs/dsl_dataset.c4
-rw-r--r--module/zfs/dsl_pool.c4
-rw-r--r--module/zfs/spa.c14
-rw-r--r--module/zfs/zfs_fuid.c4
-rw-r--r--module/zfs/zfs_ioctl.c22
-rw-r--r--module/zfs/zio.c3
9 files changed, 32 insertions, 30 deletions
diff --git a/module/unicode/u8_textprep.c b/module/unicode/u8_textprep.c
index 34b0b9a8b..2532769c8 100644
--- a/module/unicode/u8_textprep.c
+++ b/module/unicode/u8_textprep.c
@@ -144,9 +144,10 @@
#define U8_16BIT_TABLE_INDICATOR (0x8000U)
/* The following are some convenience macros. */
-#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \
- (u) = ((uint32_t)(b1) & 0x0F) << 12 | ((uint32_t)(b2) & 0x3F) << 6 | \
- (uint32_t)(b3) & 0x3F;
+#define U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \
+ (u) = ((((uint32_t)(b1) & 0x0F) << 12) | \
+ (((uint32_t)(b2) & 0x3F) << 6) | \
+ ((uint32_t)(b3) & 0x3F));
#define U8_SIMPLE_SWAP(a, b, t) \
(t) = (a); \
diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c
index 5bf042b17..78b2c15d2 100644
--- a/module/zfs/dnode.c
+++ b/module/zfs/dnode.c
@@ -1109,7 +1109,7 @@ dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx)
int shift = epbs + dn->dn_datablkshift;
first = blkid >> epbs;
- if (db = dbuf_hold_level(dn, 1, first, FTAG)) {
+ if ((db = dbuf_hold_level(dn, 1, first, FTAG))) {
dbuf_will_dirty(db, tx);
dbuf_rele(db, FTAG);
}
diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c
index 9b87fd81e..01be9bf57 100644
--- a/module/zfs/dnode_sync.c
+++ b/module/zfs/dnode_sync.c
@@ -585,7 +585,7 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
mutex_exit(&dn->dn_mtx);
/* process all the "freed" ranges in the file */
- while (rp = avl_last(&dn->dn_ranges[txgoff])) {
+ while ((rp = avl_last(&dn->dn_ranges[txgoff]))) {
dnode_sync_free_range(dn, rp->fr_blkid, rp->fr_nblks, tx);
/* grab the mutex so we don't race with dnode_block_freed() */
mutex_enter(&dn->dn_mtx);
diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c
index 6edeef31d..a11f226a0 100644
--- a/module/zfs/dsl_dataset.c
+++ b/module/zfs/dsl_dataset.c
@@ -2333,8 +2333,8 @@ dsl_dataset_promote_check(void *arg1, void *arg2, dmu_tx_t *tx)
if (ds->ds_phys->ds_prev_snap_obj == 0)
continue;
- if (err = bplist_space(&ds->ds_deadlist,
- &dlused, &dlcomp, &dluncomp))
+ if ((err = bplist_space(&ds->ds_deadlist,
+ &dlused, &dlcomp, &dluncomp)))
return (err);
pa->used += dlused;
pa->comp += dlcomp;
diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c
index 722662e62..3457bafea 100644
--- a/module/zfs/dsl_pool.c
+++ b/module/zfs/dsl_pool.c
@@ -312,12 +312,12 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg)
ASSERT(err == 0);
DTRACE_PROBE(pool_sync__2rootzio);
- while (dstg = txg_list_remove(&dp->dp_sync_tasks, txg))
+ while ((dstg = txg_list_remove(&dp->dp_sync_tasks, txg)))
dsl_sync_task_group_sync(dstg, tx);
DTRACE_PROBE(pool_sync__3task);
start = gethrtime();
- while (dd = txg_list_remove(&dp->dp_dirty_dirs, txg))
+ while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg)))
dsl_dir_sync(dd, tx);
write_time += gethrtime() - start;
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 57389a133..1ec801130 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -215,8 +215,8 @@ spa_prop_get(spa_t *spa, nvlist_t **nvp)
dp = spa_get_dsl(spa);
rw_enter(&dp->dp_config_rwlock, RW_READER);
- if (err = dsl_dataset_hold_obj(dp,
- za.za_first_integer, FTAG, &ds)) {
+ if ((err = dsl_dataset_hold_obj(dp,
+ za.za_first_integer, FTAG, &ds))) {
rw_exit(&dp->dp_config_rwlock);
break;
}
@@ -336,8 +336,8 @@ spa_prop_validate(spa_t *spa, nvlist_t *props)
break;
}
- if (error = dmu_objset_open(strval, DMU_OST_ZFS,
- DS_MODE_USER | DS_MODE_READONLY, &os))
+ if ((error = dmu_objset_open(strval,DMU_OST_ZFS,
+ DS_MODE_USER | DS_MODE_READONLY, &os)))
break;
/* We don't support gzip bootable datasets */
@@ -2369,7 +2369,7 @@ spa_check_rootconf(char *devpath, char *devid, nvlist_t **bestconf,
uint64_t txg;
int error;
- if (error = vdev_disk_read_rootlabel(devpath, devid, &config))
+ if ((error = vdev_disk_read_rootlabel(devpath, devid, &config)))
return (error);
VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) == 0);
@@ -2415,7 +2415,7 @@ spa_get_rootconf(char *devpath, char *devid, nvlist_t **bestconf)
if (devpath && ((tmp = strchr(devpath, ' ')) != NULL))
*tmp = '\0';
- if (error = spa_check_rootconf(devpath, devid, &conf, &txg)) {
+ if ((error = spa_check_rootconf(devpath, devid, &conf, &txg))) {
cmn_err(CE_NOTE, "error reading device label");
return (error);
}
@@ -2499,7 +2499,7 @@ spa_import_rootpool(char *devpath, char *devid)
* Get the vdev pathname and configuation from the most
* recently updated vdev (highest txg).
*/
- if (error = spa_get_rootconf(devpath, devid, &conf))
+ if ((error = spa_get_rootconf(devpath, devid, &conf)))
goto msg_out;
/*
diff --git a/module/zfs/zfs_fuid.c b/module/zfs/zfs_fuid.c
index 286dafba8..ce2bc9303 100644
--- a/module/zfs/zfs_fuid.c
+++ b/module/zfs/zfs_fuid.c
@@ -161,12 +161,12 @@ zfs_fuid_table_destroy(avl_tree_t *idx_tree, avl_tree_t *domain_tree)
void *cookie;
cookie = NULL;
- while (domnode = avl_destroy_nodes(domain_tree, &cookie))
+ while ((domnode = avl_destroy_nodes(domain_tree, &cookie)))
ksiddomain_rele(domnode->f_ksid);
avl_destroy(domain_tree);
cookie = NULL;
- while (domnode = avl_destroy_nodes(idx_tree, &cookie))
+ while ((domnode = avl_destroy_nodes(idx_tree, &cookie)))
kmem_free(domnode, sizeof (fuid_domain_t));
avl_destroy(idx_tree);
}
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index aa7ffb59d..7a7bc172b 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -748,8 +748,8 @@ zfs_ioc_pool_create(zfs_cmd_t *zc)
nvlist_t *zplprops = NULL;
char *buf;
- if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
- &config))
+ if ((error = get_nvlist(zc->zc_nvlist_conf,
+ zc->zc_nvlist_conf_size, &config)))
return (error);
if (zc->zc_nvlist_src_size != 0 && (error =
@@ -1020,7 +1020,7 @@ zfs_ioc_dsobj_to_dsname(zfs_cmd_t *zc)
{
int error;
- if (error = dsl_dsobj_to_dsname(zc->zc_name, zc->zc_obj, zc->zc_value))
+ if ((error = dsl_dsobj_to_dsname(zc->zc_name,zc->zc_obj,zc->zc_value)))
return (error);
return (0);
@@ -1203,8 +1203,8 @@ zfs_ioc_objset_stats(zfs_cmd_t *zc)
int error;
nvlist_t *nv;
- if (error = dmu_objset_open(zc->zc_name,
- DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os))
+ if ((error = dmu_objset_open(zc->zc_name,
+ DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)))
return (error);
dmu_objset_fast_stat(os, &zc->zc_objset_stats);
@@ -1261,8 +1261,8 @@ zfs_ioc_objset_zplprops(zfs_cmd_t *zc)
objset_t *os;
int err;
- if (err = dmu_objset_open(zc->zc_name,
- DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os))
+ if ((err = dmu_objset_open(zc->zc_name,
+ DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)))
return (err);
dmu_objset_fast_stat(os, &zc->zc_objset_stats);
@@ -1310,8 +1310,8 @@ zfs_ioc_dataset_list_next(zfs_cmd_t *zc)
int error;
char *p;
- if (error = dmu_objset_open(zc->zc_name,
- DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)) {
+ if ((error = dmu_objset_open(zc->zc_name,
+ DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os))) {
if (error == ENOENT)
error = ESRCH;
return (error);
@@ -1425,8 +1425,8 @@ zfs_set_prop_nvlist(const char *name, nvlist_t *nvl)
nvpair_type(elem) != DATA_TYPE_STRING)
return (EINVAL);
- if (error = zfs_secpolicy_write_perms(name,
- ZFS_DELEG_PERM_USERPROP, CRED()))
+ if ((error = zfs_secpolicy_write_perms(name,
+ ZFS_DELEG_PERM_USERPROP, CRED())))
return (error);
continue;
}
diff --git a/module/zfs/zio.c b/module/zfs/zio.c
index 5c60b8c97..89c72ad18 100644
--- a/module/zfs/zio.c
+++ b/module/zfs/zio.c
@@ -2204,11 +2204,12 @@ zio_done(zio_t *zio)
*/
ASSERT(vd == NULL && bp != NULL);
- if (IO_IS_ALLOCATING(zio))
+ if (IO_IS_ALLOCATING(zio)) {
if (zio->io_error != ENOSPC)
zio->io_reexecute |= ZIO_REEXECUTE_NOW;
else
zio->io_reexecute |= ZIO_REEXECUTE_SUSPEND;
+ }
if ((zio->io_type == ZIO_TYPE_READ ||
zio->io_type == ZIO_TYPE_FREE) &&