Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110242
b: refs/heads/master
c: 9283dfe
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Oct 9, 2008
1 parent 937b8e8 commit fd9c744
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d5922572038bae9f7b16fcb974eee806727b44c
refs/heads/master: 9283dfed51b223eddf68bdf91c5cddc4a9abbdbe
8 changes: 5 additions & 3 deletions trunk/mm/slob.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,11 @@ size_t ksize(const void *block)
return 0;

sp = (struct slob_page *)virt_to_page(block);
if (slob_page(sp))
return (((slob_t *)block - 1)->units - 1) * SLOB_UNIT;
else
if (slob_page(sp)) {
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
unsigned int *m = (unsigned int *)(block - align);
return SLOB_UNITS(*m) * SLOB_UNIT;
} else
return sp->page.private;
}

Expand Down

0 comments on commit fd9c744

Please sign in to comment.