diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 09:52:39 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-27 15:28:32 -0700 |
commit | d6320ddb78fa89c4d0fc2af00ae53c7c70992f96 (patch) | |
tree | 8a50c251b955ae31a670835ac0c90cfba6d28752 /module/zfs/arc.c | |
parent | c5b3a7bbcc321846bb15ff73c6fd6f1c483b6aa6 (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/arc.c')
-rw-r--r-- | module/zfs/arc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index a82718e8b..de09ca9a9 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -1426,10 +1426,11 @@ arc_buf_destroy(arc_buf_t *buf, boolean_t recycle, boolean_t all) static void arc_hdr_destroy(arc_buf_hdr_t *hdr) { + l2arc_buf_hdr_t *l2hdr = hdr->b_l2hdr; + ASSERT(refcount_is_zero(&hdr->b_refcnt)); ASSERT3P(hdr->b_state, ==, arc_anon); ASSERT(!HDR_IO_IN_PROGRESS(hdr)); - l2arc_buf_hdr_t *l2hdr = hdr->b_l2hdr; if (l2hdr != NULL) { boolean_t buflist_held = MUTEX_HELD(&l2arc_buflist_mtx); @@ -4235,6 +4236,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) l2arc_write_callback_t *cb; zio_t *pio, *wzio; uint64_t guid = spa_guid(spa); + int try; ASSERT(dev->l2ad_vdev != NULL); @@ -4248,7 +4250,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) * Copy buffers for L2ARC writing. */ mutex_enter(&l2arc_buflist_mtx); - for (int try = 0; try <= 3; try++) { + for (try = 0; try <= 3; try++) { list = l2arc_list_locked(try, &list_lock); passed_sz = 0; |