summaryrefslogtreecommitdiffstats
path: root/mm/zbud.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-12 19:22:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-12 19:22:49 +0200
commitfbf8d7106c926d375c76e65cc878f4fa7b91cbc3 (patch)
treee9faf7f8a9ce8da9ad2e2a3f1768a4af414670d4 /mm/zbud.c
parentstaging/zcache: Fix memory leak while dropping an o2net_sock_container object (diff)
parentLinux 3.11-rc5 (diff)
downloadlinux-fbf8d7106c926d375c76e65cc878f4fa7b91cbc3.tar.xz
linux-fbf8d7106c926d375c76e65cc878f4fa7b91cbc3.zip
Merge 3.11-rc5 into staging-next
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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,
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);