summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_objset.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 09:52:39 -0700
committerBrian Behlendorf <[email protected]>2010-08-27 15:28:32 -0700
commitd6320ddb78fa89c4d0fc2af00ae53c7c70992f96 (patch)
tree8a50c251b955ae31a670835ac0c90cfba6d28752 /module/zfs/dmu_objset.c
parentc5b3a7bbcc321846bb15ff73c6fd6f1c483b6aa6 (diff)
Fix gcc c90 compliance warnings
Fix non-c90 compliant code, for the most part these changes simply deal with where a particular variable is declared. Under c90 it must alway be done at the very start of a block. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/dmu_objset.c')
-rw-r--r--module/zfs/dmu_objset.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
index 7caebd979..bacd62c09 100644
--- a/module/zfs/dmu_objset.c
+++ b/module/zfs/dmu_objset.c
@@ -528,8 +528,9 @@ void
dmu_objset_evict(objset_t *os)
{
dsl_dataset_t *ds = os->os_dsl_dataset;
+ int t;
- for (int t = 0; t < TXG_SIZE; t++)
+ for (t = 0; t < TXG_SIZE; t++)
ASSERT(!dmu_objset_is_dirty(os, t));
if (ds) {
@@ -1041,6 +1042,8 @@ dmu_objset_sync_dnodes(list_t *list, list_t *newlist, dmu_tx_t *tx)
static void
dmu_objset_write_ready(zio_t *zio, arc_buf_t *abuf, void *arg)
{
+ int i;
+
blkptr_t *bp = zio->io_bp;
objset_t *os = arg;
dnode_phys_t *dnp = &os->os_phys->os_meta_dnode;
@@ -1056,7 +1059,7 @@ dmu_objset_write_ready(zio_t *zio, arc_buf_t *abuf, void *arg)
* dnode and user/group accounting objects).
*/
bp->blk_fill = 0;
- for (int i = 0; i < dnp->dn_nblkptr; i++)
+ for (i = 0; i < dnp->dn_nblkptr; i++)
bp->blk_fill += dnp->dn_blkptr[i].blk_fill;
}
@@ -1178,7 +1181,9 @@ dmu_objset_is_dirty(objset_t *os, uint64_t txg)
boolean_t
dmu_objset_is_dirty_anywhere(objset_t *os)
{
- for (int t = 0; t < TXG_SIZE; t++)
+ int t;
+
+ for (t = 0; t < TXG_SIZE; t++)
if (dmu_objset_is_dirty(os, t))
return (B_TRUE);
return (B_FALSE);