aboutsummaryrefslogtreecommitdiffstats
path: root/mm/zbud.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/zbud.c')
-rw-r--r--mm/zbud.c2
1 files changed, 1 insertions, 1 deletions
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,
257 257
258 if (size <= 0 || gfp & __GFP_HIGHMEM) 258 if (size <= 0 || gfp & __GFP_HIGHMEM)
259 return -EINVAL; 259 return -EINVAL;
260 if (size > PAGE_SIZE - ZHDR_SIZE_ALIGNED) 260 if (size > PAGE_SIZE - ZHDR_SIZE_ALIGNED - CHUNK_SIZE)
261 return -ENOSPC; 261 return -ENOSPC;
262 chunks = size_to_chunks(size); 262 chunks = size_to_chunks(size);
263 spin_lock(&pool->lock); 263 spin_lock(&pool->lock);