diff options
author | Don Brady <[email protected]> | 2017-11-04 14:25:13 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-11-04 13:25:13 -0700 |
commit | 1c27024e22af4386b592b30d40e6a0820ceb48c1 (patch) | |
tree | 689d4b821fd6910a137a0f93351351def5011cec /module/zfs/abd.c | |
parent | df1f129bc4150fd6ea3f23a01154a71ffa48bf12 (diff) |
Undo c89 workarounds to match with upstream
With PR 5756 the zfs module now supports c99 and the
remaining past c89 workarounds can be undone.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Don Brady <[email protected]>
Closes #6816
Diffstat (limited to 'module/zfs/abd.c')
-rw-r--r-- | module/zfs/abd.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/module/zfs/abd.c b/module/zfs/abd.c index 3c7893dcd..5e31d192e 100644 --- a/module/zfs/abd.c +++ b/module/zfs/abd.c @@ -581,14 +581,12 @@ abd_free_struct(abd_t *abd) abd_t * abd_alloc(size_t size, boolean_t is_metadata) { - abd_t *abd; - if (!zfs_abd_scatter_enabled || size <= PAGESIZE) return (abd_alloc_linear(size, is_metadata)); VERIFY3U(size, <=, SPA_MAXBLOCKSIZE); - abd = abd_alloc_struct(); + abd_t *abd = abd_alloc_struct(); abd->abd_flags = ABD_FLAG_OWNER; abd_alloc_pages(abd, size); @@ -1108,10 +1106,9 @@ abd_iterate_func(abd_t *abd, size_t off, size_t size, abd_iter_advance(&aiter, off); while (size > 0) { - size_t len; abd_iter_map(&aiter); - len = MIN(aiter.iter_mapsize, size); + size_t len = MIN(aiter.iter_mapsize, size); ASSERT3U(len, >, 0); ret = func(aiter.iter_mapaddr, len, private); @@ -1242,13 +1239,12 @@ abd_iterate_func2(abd_t *dabd, abd_t *sabd, size_t doff, size_t soff, abd_iter_advance(&saiter, soff); while (size > 0) { - size_t dlen, slen, len; abd_iter_map(&daiter); abd_iter_map(&saiter); - dlen = MIN(daiter.iter_mapsize, size); - slen = MIN(saiter.iter_mapsize, size); - len = MIN(dlen, slen); + size_t dlen = MIN(daiter.iter_mapsize, size); + size_t slen = MIN(saiter.iter_mapsize, size); + size_t len = MIN(dlen, slen); ASSERT(dlen > 0 || slen > 0); ret = func(daiter.iter_mapaddr, saiter.iter_mapaddr, len, |