Merge branch 'gcc-no-parenthesis' into refs/top-bases/gcc-branch

This commit is contained in:
Brian Behlendorf 2010-06-14 15:37:00 -07:00
commit c8d75a1c9d
8 changed files with 23 additions and 22 deletions

View File

@ -1235,7 +1235,7 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
if (flags.dedup) { if (flags.dedup) {
featureflags |= (DMU_BACKUP_FEATURE_DEDUP | featureflags |= (DMU_BACKUP_FEATURE_DEDUP |
DMU_BACKUP_FEATURE_DEDUPPROPS); DMU_BACKUP_FEATURE_DEDUPPROPS);
if (err = pipe(pipefd)) { if ((err = pipe(pipefd))) {
zfs_error_aux(zhp->zfs_hdl, strerror(errno)); zfs_error_aux(zhp->zfs_hdl, strerror(errno));
return (zfs_error(zhp->zfs_hdl, EZFS_PIPEFAILED, return (zfs_error(zhp->zfs_hdl, EZFS_PIPEFAILED,
errbuf)); errbuf));
@ -1243,7 +1243,7 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
dda.outputfd = outfd; dda.outputfd = outfd;
dda.inputfd = pipefd[1]; dda.inputfd = pipefd[1];
dda.dedup_hdl = zhp->zfs_hdl; dda.dedup_hdl = zhp->zfs_hdl;
if (err = pthread_create(&tid, NULL, cksummer, &dda)) { if ((err = pthread_create(&tid, NULL, cksummer, &dda))) {
(void) close(pipefd[0]); (void) close(pipefd[0]);
(void) close(pipefd[1]); (void) close(pipefd[1]);
zfs_error_aux(zhp->zfs_hdl, strerror(errno)); zfs_error_aux(zhp->zfs_hdl, strerror(errno));

View File

@ -58,7 +58,7 @@ bplist_iterate(bplist_t *bpl, bplist_itor_t *func, void *arg, dmu_tx_t *tx)
bplist_entry_t *bpe; bplist_entry_t *bpe;
mutex_enter(&bpl->bpl_lock); mutex_enter(&bpl->bpl_lock);
while (bpe = list_head(&bpl->bpl_list)) { while ((bpe = list_head(&bpl->bpl_list))) {
list_remove(&bpl->bpl_list, bpe); list_remove(&bpl->bpl_list, bpe);
mutex_exit(&bpl->bpl_lock); mutex_exit(&bpl->bpl_lock);
func(arg, &bpe->bpe_blk, tx); func(arg, &bpe->bpe_blk, tx);

View File

@ -1185,8 +1185,9 @@ restore_write_byref(struct restorearg *ra, objset_t *os,
ref_os = os; ref_os = os;
} }
if (err = dmu_buf_hold(ref_os, drrwbr->drr_refobject, err = dmu_buf_hold(ref_os, drrwbr->drr_refobject,
drrwbr->drr_refoffset, FTAG, &dbp, DMU_READ_PREFETCH)) drrwbr->drr_refoffset, FTAG, &dbp, DMU_READ_PREFETCH);
if (err)
return (err); return (err);
tx = dmu_tx_create(os); tx = dmu_tx_create(os);
@ -1443,7 +1444,7 @@ out:
if (featureflags & DMU_BACKUP_FEATURE_DEDUP) { if (featureflags & DMU_BACKUP_FEATURE_DEDUP) {
void *cookie = NULL; void *cookie = NULL;
while (gmep = avl_destroy_nodes(&ra.guid_to_ds_map, &cookie)) { while ((gmep = avl_destroy_nodes(&ra.guid_to_ds_map, &cookie))) {
dsl_dataset_rele(gmep->gme_ds, &ra.guid_to_ds_map); dsl_dataset_rele(gmep->gme_ds, &ra.guid_to_ds_map);
kmem_free(gmep, sizeof (guid_map_entry_t)); kmem_free(gmep, sizeof (guid_map_entry_t));
} }

View File

@ -1218,7 +1218,7 @@ dmu_tx_do_callbacks(list_t *cb_list, int error)
{ {
dmu_tx_callback_t *dcb; dmu_tx_callback_t *dcb;
while (dcb = list_head(cb_list)) { while ((dcb = list_head(cb_list))) {
list_remove(cb_list, dcb); list_remove(cb_list, dcb);
dcb->dcb_func(dcb->dcb_data, error); dcb->dcb_func(dcb->dcb_data, error);
kmem_free(dcb, sizeof (dmu_tx_callback_t)); kmem_free(dcb, sizeof (dmu_tx_callback_t));

View File

@ -665,7 +665,7 @@ dmu_zfetch(zfetch_t *zf, uint64_t offset, uint64_t size, int prefetched)
ZFETCHSTAT_BUMP(zfetchstat_hits); ZFETCHSTAT_BUMP(zfetchstat_hits);
} else { } else {
ZFETCHSTAT_BUMP(zfetchstat_misses); ZFETCHSTAT_BUMP(zfetchstat_misses);
if (fetched = dmu_zfetch_colinear(zf, &zst)) { if ((fetched = dmu_zfetch_colinear(zf, &zst))) {
ZFETCHSTAT_BUMP(zfetchstat_colinear_hits); ZFETCHSTAT_BUMP(zfetchstat_colinear_hits);
} else { } else {
ZFETCHSTAT_BUMP(zfetchstat_colinear_misses); ZFETCHSTAT_BUMP(zfetchstat_colinear_misses);

View File

@ -1022,16 +1022,16 @@ sa_tear_down(objset_t *os)
sizeof (sa_attr_table_t) * sa->sa_num_attrs); sizeof (sa_attr_table_t) * sa->sa_num_attrs);
cookie = NULL; cookie = NULL;
while (layout = avl_destroy_nodes(&sa->sa_layout_hash_tree, &cookie)) { while ((layout = avl_destroy_nodes(&sa->sa_layout_hash_tree, &cookie))){
sa_idx_tab_t *tab; sa_idx_tab_t *tab;
while (tab = list_head(&layout->lot_idx_tab)) { while ((tab = list_head(&layout->lot_idx_tab))) {
ASSERT(refcount_count(&tab->sa_refcount)); ASSERT(refcount_count(&tab->sa_refcount));
sa_idx_tab_rele(os, tab); sa_idx_tab_rele(os, tab);
} }
} }
cookie = NULL; cookie = NULL;
while (layout = avl_destroy_nodes(&sa->sa_layout_num_tree, &cookie)) { while ((layout = avl_destroy_nodes(&sa->sa_layout_num_tree, &cookie))){
kmem_free(layout->lot_attrs, kmem_free(layout->lot_attrs,
sizeof (sa_attr_type_t) * layout->lot_attr_count); sizeof (sa_attr_type_t) * layout->lot_attr_count);
kmem_free(layout, sizeof (sa_lot_t)); kmem_free(layout, sizeof (sa_lot_t));
@ -1304,7 +1304,7 @@ sa_handle_get(objset_t *objset, uint64_t objid, void *userp,
dmu_buf_t *db; dmu_buf_t *db;
int error; int error;
if (error = dmu_bonus_hold(objset, objid, NULL, &db)) if ((error = dmu_bonus_hold(objset, objid, NULL, &db)))
return (error); return (error);
return (sa_handle_get_from_db(objset, db, userp, hdl_type, return (sa_handle_get_from_db(objset, db, userp, hdl_type,

View File

@ -5382,7 +5382,7 @@ spa_sync(spa_t *spa, uint64_t txg)
ddt_sync(spa, txg); ddt_sync(spa, txg);
dsl_scan_sync(dp, tx); dsl_scan_sync(dp, tx);
while (vd = txg_list_remove(&spa->spa_vdev_txg_list, txg)) while ((vd = txg_list_remove(&spa->spa_vdev_txg_list, txg)))
vdev_sync(vd, txg); vdev_sync(vd, txg);
if (pass == 1) if (pass == 1)

View File

@ -1521,8 +1521,8 @@ zfs_ioc_vdev_split(zfs_cmd_t *zc)
if ((error = spa_open(zc->zc_name, &spa, FTAG)) != 0) if ((error = spa_open(zc->zc_name, &spa, FTAG)) != 0)
return (error); return (error);
if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size, if ((error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
zc->zc_iflags, &config)) { zc->zc_iflags, &config))) {
spa_close(spa, FTAG); spa_close(spa, FTAG);
return (error); return (error);
} }
@ -1637,13 +1637,13 @@ zfs_ioc_objset_stats(zfs_cmd_t *zc)
* local property values. * local property values.
*/ */
static int static int
zfs_ioc_objset_recvd_props(zfs_cmd_t *zc) zfs_ioc_objset_recvd_props(struct file *filp, zfs_cmd_t *zc)
{ {
objset_t *os = NULL; objset_t *os = NULL;
int error; int error;
nvlist_t *nv; nvlist_t *nv;
if (error = dmu_objset_hold(zc->zc_name, FTAG, &os)) if ((error = dmu_objset_hold(zc->zc_name, FTAG, &os)))
return (error); return (error);
/* /*
@ -2368,8 +2368,8 @@ zfs_ioc_pool_set_props(zfs_cmd_t *zc)
int error; int error;
nvpair_t *pair; nvpair_t *pair;
if (error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size, if ((error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
zc->zc_iflags, &props)) zc->zc_iflags, &props)))
return (error); return (error);
/* /*
@ -3090,8 +3090,8 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
if (prop == ZPROP_INVAL) { if (prop == ZPROP_INVAL) {
if (zfs_prop_user(propname)) { if (zfs_prop_user(propname)) {
if (err = zfs_secpolicy_write_perms(dsname, if ((err = zfs_secpolicy_write_perms(dsname,
ZFS_DELEG_PERM_USERPROP, cr)) ZFS_DELEG_PERM_USERPROP, cr)))
return (err); return (err);
return (0); return (0);
} }
@ -3114,7 +3114,7 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
return (EINVAL); return (EINVAL);
} }
if (err = zfs_secpolicy_write_perms(dsname, perm, cr)) if ((err = zfs_secpolicy_write_perms(dsname, perm, cr)))
return (err); return (err);
return (0); return (0);
} }