Lines Matching refs:congested
314 wb->congested = wb_congested_get_create(bdi, blkcg_id, gfp); in wb_init()
315 if (!wb->congested) in wb_init()
335 wb_congested_put(wb->congested); in wb_init()
372 wb_congested_put(wb->congested); in wb_exit()
401 struct bdi_writeback_congested *new_congested = NULL, *congested; in wb_congested_get_create() local
412 congested = container_of(parent, struct bdi_writeback_congested, in wb_congested_get_create()
414 if (congested->blkcg_id < blkcg_id) in wb_congested_get_create()
416 else if (congested->blkcg_id > blkcg_id) in wb_congested_get_create()
424 congested = new_congested; in wb_congested_get_create()
426 rb_link_node(&congested->rb_node, parent, node); in wb_congested_get_create()
427 rb_insert_color(&congested->rb_node, &bdi->cgwb_congested_tree); in wb_congested_get_create()
444 atomic_inc(&congested->refcnt); in wb_congested_get_create()
447 return congested; in wb_congested_get_create()
456 void wb_congested_put(struct bdi_writeback_congested *congested) in wb_congested_put() argument
461 if (!atomic_dec_and_lock(&congested->refcnt, &cgwb_lock)) { in wb_congested_put()
467 if (congested->bdi) { in wb_congested_put()
468 rb_erase(&congested->rb_node, in wb_congested_put()
469 &congested->bdi->cgwb_congested_tree); in wb_congested_put()
470 congested->bdi = NULL; in wb_congested_put()
474 kfree(congested); in wb_congested_put()
695 struct bdi_writeback_congested *congested = in cgwb_bdi_destroy() local
699 congested->bdi = NULL; /* mark @congested unlinked */ in cgwb_bdi_destroy()
898 void clear_wb_congested(struct bdi_writeback_congested *congested, int sync) in clear_wb_congested() argument
904 if (test_and_clear_bit(bit, &congested->state)) in clear_wb_congested()
912 void set_wb_congested(struct bdi_writeback_congested *congested, int sync) in set_wb_congested() argument
917 if (!test_and_set_bit(bit, &congested->state)) in set_wb_congested()