Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb86d371 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "bdi: Mark congested->bdi as internal"

parents a74fc112 1448b926
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -54,7 +54,9 @@ struct bdi_writeback_congested {
	atomic_t refcnt;		/* nr of attached wb's and blkg */

#ifdef CONFIG_CGROUP_WRITEBACK
	struct backing_dev_info *bdi;	/* the associated bdi */
	struct backing_dev_info *__bdi;	/* the associated bdi, set to NULL
					 * on bdi unregistration. For memcg-wb
					 * internal use only! */
	int blkcg_id;			/* ID of the associated blkcg */
	struct rb_node rb_node;		/* on bdi->cgwb_congestion_tree */
#endif
+5 −5
Original line number Diff line number Diff line
@@ -437,7 +437,7 @@ wb_congested_get_create(struct backing_dev_info *bdi, int blkcg_id, gfp_t gfp)
		return NULL;

	atomic_set(&new_congested->refcnt, 0);
	new_congested->bdi = bdi;
	new_congested->__bdi = bdi;
	new_congested->blkcg_id = blkcg_id;
	goto retry;

@@ -465,10 +465,10 @@ void wb_congested_put(struct bdi_writeback_congested *congested)
	}

	/* bdi might already have been destroyed leaving @congested unlinked */
	if (congested->bdi) {
	if (congested->__bdi) {
		rb_erase(&congested->rb_node,
			 &congested->bdi->cgwb_congested_tree);
		congested->bdi = NULL;
			 &congested->__bdi->cgwb_congested_tree);
		congested->__bdi = NULL;
	}

	spin_unlock_irqrestore(&cgwb_lock, flags);
@@ -751,7 +751,7 @@ static void cgwb_bdi_exit(struct backing_dev_info *bdi)
			rb_entry(rbn, struct bdi_writeback_congested, rb_node);

		rb_erase(rbn, &bdi->cgwb_congested_tree);
		congested->bdi = NULL;	/* mark @congested unlinked */
		congested->__bdi = NULL;	/* mark @congested unlinked */
	}
	spin_unlock_irq(&cgwb_lock);
}