xfs_refcount_decrease_extent(tp, &smap);
                qdelta -= smap.br_blockcount;
        } else if (smap.br_startblock == DELAYSTARTBLOCK) {
-               xfs_filblks_t   len = smap.br_blockcount;
+               int             done;
 
                /*
                 * If the extent we're unmapping is a delalloc reservation,
                 * incore state.  Dropping the delalloc reservation takes care
                 * of the quota reservation for us.
                 */
-               error = __xfs_bunmapi(NULL, ip, smap.br_startoff, &len, 0, 1);
+               error = xfs_bunmapi(NULL, ip, smap.br_startoff,
+                               smap.br_blockcount, 0, 1, &done);
                if (error)
                        goto out_cancel;
-               ASSERT(len == 0);
+               ASSERT(done);
        }
 
        /*