X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=mm%2Fzbud.c;h=ad1e781284fdd48492e7bac46c245fae5d578f95;hb=f9061f2fc1e66264597c36ebb084fb8c35117e67;hp=9bb4710e35898b61c6824253501107898db76f36;hpb=27ddabc32d9e26eb590fb7153b588eff84a9c499;p=karo-tx-linux.git diff --git a/mm/zbud.c b/mm/zbud.c index 9bb4710e3589..ad1e781284fd 100644 --- a/mm/zbud.c +++ b/mm/zbud.c @@ -257,7 +257,7 @@ int zbud_alloc(struct zbud_pool *pool, int size, gfp_t gfp, if (size <= 0 || gfp & __GFP_HIGHMEM) return -EINVAL; - if (size > PAGE_SIZE - ZHDR_SIZE_ALIGNED) + if (size > PAGE_SIZE - ZHDR_SIZE_ALIGNED - CHUNK_SIZE) return -ENOSPC; chunks = size_to_chunks(size); spin_lock(&pool->lock);