Group short-lived and reclaimable kernel allocations
[sfrench/cifs-2.6.git] / fs / buffer.c
index a406cfd89e3bc184dea41e7da231449ea2c9d112..faceb5eecca96d5fd8d879640c510e2edb944a85 100644 (file)
@@ -3169,7 +3169,8 @@ static void recalc_bh_state(void)
        
 struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
 {
-       struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags);
+       struct buffer_head *ret = kmem_cache_zalloc(bh_cachep,
+                               set_migrateflags(gfp_flags, __GFP_RECLAIMABLE));
        if (ret) {
                INIT_LIST_HEAD(&ret->b_assoc_buffers);
                get_cpu_var(bh_accounting).nr++;