aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2018-11-24 21:52:10 +0000
committerAlan Cox <alc@FreeBSD.org>2018-11-24 21:52:10 +0000
commitee73fef96e402011fefbc364d66996655f11a81f (patch)
tree26a3734a6f4cd6a6779235ffba8f06f75cbbd22b
parent80203ccefd77badf5dc58a63047a1da2d303472c (diff)
Notes
-rw-r--r--sys/kern/subr_blist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/subr_blist.c b/sys/kern/subr_blist.c
index 0e5156c5053c..21a1ab033535 100644
--- a/sys/kern/subr_blist.c
+++ b/sys/kern/subr_blist.c
@@ -764,6 +764,8 @@ blst_meta_alloc(blmeta_t *scan, daddr_t cursor, daddr_t count, u_daddr_t radix)
/* Discard any candidates that appear before cursor. */
digit = (cursor / radix) & BLIST_META_MASK;
mask &= (u_daddr_t)-1 << digit;
+ if (mask == 0)
+ return (SWAPBLK_NONE);
/*
* If the first try is for a block that includes the cursor, pre-undo