From: Bruce Schmid <duck@freescale.com> gen_pool_alloc() doesn't allocate the last chunk in a pool. This patch fixes that problem by correcting the calculation of the number of the last bit in the bitmap. Cc: Dean Nelson <dcn@sgi.com> Signed-off-by: Bruce Schmid <duck@freescale.com> --- lib/genalloc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/genalloc.c b/lib/genalloc.c index f6d276d..ac00492 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c @@ -127,7 +127,7 @@ unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size) chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); end_bit = (chunk->end_addr - chunk->start_addr) >> order; - end_bit -= nbits + 1; + end_bit -= (nbits - 1); spin_lock_irqsave(&chunk->lock, flags); bit = -1; -- 1.5.4 --
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| majkls | sys_chroot+sys_fchdir Fix |
| Pierre Ossman | Re: [RFC][PATCH] cpuidle: avoid singing capacitors |
git: | |
| Randal L. Schwartz | [BUG] daemon.c blows up on OSX (was Re: What's in git.git (stable), and Announcing... |
| Shawn O. Pearce | Re: Smart fetch via HTTP? |
| Jakub Narebski | Re: VCS comparison table |
| Johannes Schindelin | Re: rc4 - make quick-install-doc is broken |
| Henning Brauer | Re: httpdv6 |
| Edd Barrett | Re: Cold Boot Attacks on Encryption Keys |
| stuartv | Re: Microsoft gets the Most Secure Operating Systems award |
| Sunnz | How do I configure sendmail? |
| Stephen Pierce | SLS |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Dave `geek' Gymer | WARNING (was Re: New afio release) |
| Anthony Peacock | Re: ACK! Something's wrong with X! :( |
