]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/slub.c
Merge branch 'topic/kmemtrace' of git://git.kernel.org/pub/scm/linux/kernel/git/penbe...
[linux-2.6-omap-h63xx.git] / mm / slub.c
index e27472368cc3dcf48202ebca331ca85ed6b7c8a3..4cd7bfd2ab2c1fe45c80f360db744d006ec95d05 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2984,8 +2984,10 @@ static int slab_memory_callback(struct notifier_block *self,
        case MEM_CANCEL_OFFLINE:
                break;
        }
-
-       ret = notifier_from_errno(ret);
+       if (ret)
+               ret = notifier_from_errno(ret);
+       else
+               ret = NOTIFY_OK;
        return ret;
 }
 
@@ -3662,7 +3664,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
        for (i = 0; i < t.count; i++) {
                struct location *l = &t.loc[i];
 
-               if (len > PAGE_SIZE - 100)
+               if (len > PAGE_SIZE - KSYM_SYMBOL_LEN - 100)
                        break;
                len += sprintf(buf + len, "%7ld ", l->count);