Commit 2ad69038 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] misc fixes

- Add comment about slab ctor behaviour (Ingo Oeser)

- mm/slab.c:fprob() shows up in profiles a lot.  Rename it to something more
  meaningful.

- fatfs printk warning fix (Randy Dunlap)

- give the the time interpolator list and lock file-static scope (hch)
parent 7807eb6a
...@@ -311,7 +311,7 @@ int fat__get_entry(struct inode *dir, loff_t *pos,struct buffer_head **bh, ...@@ -311,7 +311,7 @@ int fat__get_entry(struct inode *dir, loff_t *pos,struct buffer_head **bh,
*bh = sb_bread(sb, phys); *bh = sb_bread(sb, phys);
if (*bh == NULL) { if (*bh == NULL) {
printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n", printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n",
phys); (unsigned long long)phys);
/* skip this block */ /* skip this block */
*pos = (iblock + 1) << sb->s_blocksize_bits; *pos = (iblock + 1) << sb->s_blocksize_bits;
goto next; goto next;
......
...@@ -1232,8 +1232,8 @@ spinlock_t last_nsec_offset_lock = SPIN_LOCK_UNLOCKED; ...@@ -1232,8 +1232,8 @@ spinlock_t last_nsec_offset_lock = SPIN_LOCK_UNLOCKED;
#endif #endif
struct time_interpolator *time_interpolator; struct time_interpolator *time_interpolator;
struct time_interpolator *time_interpolator_list; static struct time_interpolator *time_interpolator_list;
spinlock_t time_interpolator_lock = SPIN_LOCK_UNLOCKED; static spinlock_t time_interpolator_lock = SPIN_LOCK_UNLOCKED;
static inline int static inline int
is_better_time_interpolator(struct time_interpolator *new) is_better_time_interpolator(struct time_interpolator *new)
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
* page long) and always contiguous), and each slab contains multiple * page long) and always contiguous), and each slab contains multiple
* initialized objects. * initialized objects.
* *
* This means, that your constructor is used only for newly allocated
* slabs and you must pass objects with the same intializations to
* kmem_cache_free.
*
* Each cache can only support one memory type (GFP_DMA, GFP_HIGHMEM, * Each cache can only support one memory type (GFP_DMA, GFP_HIGHMEM,
* normal). If you need a special memory type, then must create a new * normal). If you need a special memory type, then must create a new
* cache for that memory type. * cache for that memory type.
...@@ -782,7 +786,7 @@ static void poison_obj(kmem_cache_t *cachep, void *addr, unsigned char val) ...@@ -782,7 +786,7 @@ static void poison_obj(kmem_cache_t *cachep, void *addr, unsigned char val)
*(unsigned char *)(addr+size-1) = POISON_END; *(unsigned char *)(addr+size-1) = POISON_END;
} }
static void *fprob(unsigned char* addr, unsigned int size) static void *scan_poisoned_obj(unsigned char* addr, unsigned int size)
{ {
unsigned char *end; unsigned char *end;
...@@ -808,7 +812,7 @@ static void check_poison_obj(kmem_cache_t *cachep, void *addr) ...@@ -808,7 +812,7 @@ static void check_poison_obj(kmem_cache_t *cachep, void *addr)
if (cachep->flags & SLAB_STORE_USER) { if (cachep->flags & SLAB_STORE_USER) {
size -= BYTES_PER_WORD; size -= BYTES_PER_WORD;
} }
end = fprob(addr, size); end = scan_poisoned_obj(addr, size);
if (end) { if (end) {
int s; int s;
printk(KERN_ERR "Slab corruption: start=%p, expend=%p, " printk(KERN_ERR "Slab corruption: start=%p, expend=%p, "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment