Merge the _node vs normal version and drop the superflous gfp_t argument.
Unified · Split
| @@ -501,7 +501,7 @@ struct request_queue *__blk_alloc_queue(int node_id) · 500 unmodified lines | ||
| 501 | 501 | if (ret) |
| 502 | 502 | goto fail_id; |
| 503 | 503 | |
| 504 | − q->backing_dev_info = bdi_alloc_node(GFP_KERNEL, node_id); | |
| 504 | + q->backing_dev_info = bdi_alloc(node_id); | |
| 505 | 505 | if (!q->backing_dev_info) |
| 506 | 506 | goto fail_split; |
| 507 | 507 | |
| @@ -2036,7 +2036,7 @@ static struct backing_dev_info * __init mtd_bdi_init(char *name) · 2035 unmodified lines | ||
| 2036 | 2036 | struct backing_dev_info *bdi; |
| 2037 | 2037 | int ret; |
| 2038 | 2038 | |
| 2039 | − bdi = bdi_alloc(GFP_KERNEL); | |
| 2039 | + bdi = bdi_alloc(NUMA_NO_NODE); | |
| 2040 | 2040 | if (!bdi) |
| 2041 | 2041 | return ERR_PTR(-ENOMEM); |
| 2042 | 2042 | |
| @@ -1598,7 +1598,7 @@ int super_setup_bdi_name(struct super_block *sb, char *fmt, ...) · 1597 unmodified lines | ||
| 1598 | 1598 | int err; |
| 1599 | 1599 | va_list args; |
| 1600 | 1600 | |
| 1601 | − bdi = bdi_alloc(GFP_KERNEL); | |
| 1601 | + bdi = bdi_alloc(NUMA_NO_NODE); | |
| 1602 | 1602 | if (!bdi) |
| 1603 | 1603 | return -ENOMEM; |
| 1604 | 1604 | |
| @@ -36,11 +36,7 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, · 35 unmodified lines | ||
| 36 | 36 | void bdi_set_owner(struct backing_dev_info *bdi, struct device *owner); |
| 37 | 37 | void bdi_unregister(struct backing_dev_info *bdi); |
| 38 | 38 | |
| 39 | −struct backing_dev_info *bdi_alloc_node(gfp_t gfp_mask, int node_id); | |
| 40 | −static inline struct backing_dev_info *bdi_alloc(gfp_t gfp_mask) | |
| 41 | −{ | |
| 42 | − return bdi_alloc_node(gfp_mask, NUMA_NO_NODE); | |
| 43 | −} | |
| 39 | +struct backing_dev_info *bdi_alloc(int node_id); | |
| 44 | 40 | |
| 45 | 41 | void wb_start_background_writeback(struct bdi_writeback *wb); |
| 46 | 42 | void wb_workfn(struct work_struct *work); |
| @@ -865,12 +865,11 @@ static int bdi_init(struct backing_dev_info *bdi) · 864 unmodified lines | ||
| 865 | 865 | return ret; |
| 866 | 866 | } |
| 867 | 867 | |
| 868 | −struct backing_dev_info *bdi_alloc_node(gfp_t gfp_mask, int node_id) | |
| 868 | +struct backing_dev_info *bdi_alloc(int node_id) | |
| 869 | 869 | { |
| 870 | 870 | struct backing_dev_info *bdi; |
| 871 | 871 | |
| 872 | − bdi = kmalloc_node(sizeof(struct backing_dev_info), | |
| 873 | − gfp_mask | __GFP_ZERO, node_id); | |
| 872 | + bdi = kzalloc_node(sizeof(*bdi), GFP_KERNEL, node_id); | |
| 874 | 873 | if (!bdi) |
| 875 | 874 | return NULL; |
| 876 | 875 | |
| @@ -880,7 +879,7 @@ struct backing_dev_info *bdi_alloc_node(gfp_t gfp_mask, int node_id) · 3 unmodified lines | ||
| 880 | 879 | } |
| 881 | 880 | return bdi; |
| 882 | 881 | } |
| 883 | −EXPORT_SYMBOL(bdi_alloc_node); | |
| 882 | +EXPORT_SYMBOL(bdi_alloc); | |
| 884 | 883 | |
| 885 | 884 | static struct rb_node **bdi_lookup_rb_node(u64 id, struct rb_node **parentp) |
| 886 | 885 | { |