From: Andrea Arcangeli This makes sure that reclaimable buffer headers and reclaimable inodes are accounted properly during the overcommit checks. Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton --- fs/buffer.c | 2 +- fs/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN fs/buffer.c~avoid-enomem-due-reclaimable-slab-caches fs/buffer.c --- 25/fs/buffer.c~avoid-enomem-due-reclaimable-slab-caches 2005-05-03 18:47:52.000000000 -0700 +++ 25-akpm/fs/buffer.c 2005-05-03 18:47:52.000000000 -0700 @@ -3115,7 +3115,7 @@ void __init buffer_init(void) bh_cachep = kmem_cache_create("buffer_head", sizeof(struct buffer_head), 0, - SLAB_PANIC, init_buffer_head, NULL); + SLAB_RECLAIM_ACCOUNT|SLAB_PANIC, init_buffer_head, NULL); /* * Limit the bh occupancy to 10% of ZONE_NORMAL diff -puN fs/inode.c~avoid-enomem-due-reclaimable-slab-caches fs/inode.c --- 25/fs/inode.c~avoid-enomem-due-reclaimable-slab-caches 2005-05-03 18:47:52.000000000 -0700 +++ 25-akpm/fs/inode.c 2005-05-03 18:47:52.000000000 -0700 @@ -1336,7 +1336,7 @@ void __init inode_init(unsigned long mem /* inode slab cache */ inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode), - 0, SLAB_PANIC, init_once, NULL); + 0, SLAB_RECLAIM_ACCOUNT|SLAB_PANIC, init_once, NULL); set_shrinker(DEFAULT_SEEKS, shrink_icache_memory); /* Hash may have been set up in inode_init_early */ _