Merge branch 'topic/kmemtrace' of git://git.kernel.org/pub/scm/linux/kernel/git/penbe...
[linux-2.6.git] / mm / slub.c
index e274723..4cd7bfd 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);