All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: axboe@kernel.dk
Cc: linux-kernel@vger.kernel.org, jack@suse.cz, Tejun Heo <tj@kernel.org>
Subject: [PATCH 09/10] writeback: add @gfp to wb_init()
Date: Tue, 18 Nov 2014 03:37:27 -0500	[thread overview]
Message-ID: <1416299848-22112-10-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1416299848-22112-1-git-send-email-tj@kernel.org>

wb_init() currently always uses GFP_KERNEL but the planned cgroup
writeback support needs using other allocation masks.  Add @gfp to
wb_init().

This patch doesn't introduce any behavior changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
---
 mm/backing-dev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 4d87957..876bf4f 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -307,7 +307,8 @@ void wb_wakeup_delayed(struct bdi_writeback *wb)
  */
 #define INIT_BW		(100 << (20 - PAGE_SHIFT))
 
-static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi)
+static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi,
+		   gfp_t gfp)
 {
 	int i, err;
 
@@ -330,12 +331,12 @@ static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi)
 	INIT_LIST_HEAD(&wb->work_list);
 	INIT_DELAYED_WORK(&wb->dwork, wb_workfn);
 
-	err = fprop_local_init_percpu(&wb->completions, GFP_KERNEL);
+	err = fprop_local_init_percpu(&wb->completions, gfp);
 	if (err)
 		return err;
 
 	for (i = 0; i < NR_WB_STAT_ITEMS; i++) {
-		err = percpu_counter_init(&wb->stat[i], 0, GFP_KERNEL);
+		err = percpu_counter_init(&wb->stat[i], 0, gfp);
 		if (err) {
 			while (--i)
 				percpu_counter_destroy(&wb->stat[i]);
@@ -415,7 +416,7 @@ int bdi_init(struct backing_dev_info *bdi)
 	bdi->max_prop_frac = FPROP_FRAC_BASE;
 	INIT_LIST_HEAD(&bdi->bdi_list);
 
-	err = wb_init(&bdi->wb, bdi);
+	err = wb_init(&bdi->wb, bdi, GFP_KERNEL);
 	if (err)
 		return err;
 
-- 
1.9.3


  parent reply	other threads:[~2014-11-18  8:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18  8:37 [PATCHSET block/for-next] writeback: prepare for cgroup writeback support Tejun Heo
2014-11-18  8:37 ` [Drbd-dev] [PATCH 01/10] writeback: move backing_dev_info->state into bdi_writeback Tejun Heo
2014-11-18  8:37   ` Tejun Heo
2014-11-20 15:27   ` [Drbd-dev] " Jan Kara
2014-11-20 15:27     ` Jan Kara
2014-11-20 15:38     ` [Drbd-dev] " Tejun Heo
2014-11-20 15:38       ` Tejun Heo
2014-11-25  1:20     ` [Drbd-dev] " NeilBrown
2014-11-25  1:20       ` NeilBrown
2014-11-18  8:37 ` [PATCH 02/10] writeback: move backing_dev_info->bdi_stat[] " Tejun Heo
2014-11-20 15:31   ` Jan Kara
2014-11-18  8:37 ` [PATCH 03/10] writeback: move bandwidth related fields from backing_dev_info " Tejun Heo
2014-11-20 15:52   ` Jan Kara
2014-11-20 16:01     ` Tejun Heo
2014-11-18  8:37 ` [PATCH 04/10] writeback: move backing_dev_info->wb_lock and ->worklist " Tejun Heo
2014-11-20 16:01   ` Jan Kara
2014-11-20 16:02     ` Tejun Heo
2014-11-20 16:10       ` Jan Kara
2014-11-18  8:37 ` [PATCH 05/10] writeback: move lingering dirty IO lists transfer from bdi_destroy() to wb_exit() Tejun Heo
2014-11-18  8:37 ` [PATCH 06/10] writeback: reorganize mm/backing-dev.c Tejun Heo
2014-11-18  8:37 ` [PATCH 07/10] writeback: separate out include/linux/backing-dev-defs.h Tejun Heo
2014-11-18  8:37 ` [PATCH 08/10] writeback: cosmetic change in account_page_dirtied() Tejun Heo
2014-11-18  8:37 ` Tejun Heo [this message]
2014-11-18  8:37 ` [PATCH 10/10] writeback: move inode_to_bdi() to include/linux/backing-dev.h Tejun Heo
2014-11-20 15:13 ` [PATCHSET block/for-next] writeback: prepare for cgroup writeback support Jan Kara
2014-11-20 15:14   ` Tejun Heo
2014-11-20 15:44     ` Christoph Hellwig
2014-11-20 16:21       ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416299848-22112-10-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.