Lines Matching refs:congested
321 wb->congested = wb_congested_get_create(bdi, blkcg_id, gfp); in wb_init()
322 if (!wb->congested) { in wb_init()
344 wb_congested_put(wb->congested); in wb_init()
387 wb_congested_put(wb->congested); in wb_exit()
417 struct bdi_writeback_congested *new_congested = NULL, *congested; in wb_congested_get_create() local
428 congested = rb_entry(parent, struct bdi_writeback_congested, in wb_congested_get_create()
430 if (congested->blkcg_id < blkcg_id) in wb_congested_get_create()
432 else if (congested->blkcg_id > blkcg_id) in wb_congested_get_create()
440 congested = new_congested; in wb_congested_get_create()
441 rb_link_node(&congested->rb_node, parent, node); in wb_congested_get_create()
442 rb_insert_color(&congested->rb_node, &bdi->cgwb_congested_tree); in wb_congested_get_create()
444 return congested; in wb_congested_get_create()
460 refcount_inc(&congested->refcnt); in wb_congested_get_create()
463 return congested; in wb_congested_get_create()
472 void wb_congested_put(struct bdi_writeback_congested *congested) in wb_congested_put() argument
476 if (!refcount_dec_and_lock_irqsave(&congested->refcnt, &cgwb_lock, &flags)) in wb_congested_put()
480 if (congested->__bdi) { in wb_congested_put()
481 rb_erase(&congested->rb_node, in wb_congested_put()
482 &congested->__bdi->cgwb_congested_tree); in wb_congested_put()
483 congested->__bdi = NULL; in wb_congested_put()
487 kfree(congested); in wb_congested_put()
768 struct bdi_writeback_congested *congested = in cgwb_bdi_exit() local
772 congested->__bdi = NULL; /* mark @congested unlinked */ in cgwb_bdi_exit()
983 void clear_wb_congested(struct bdi_writeback_congested *congested, int sync) in clear_wb_congested() argument
989 if (test_and_clear_bit(bit, &congested->state)) in clear_wb_congested()
997 void set_wb_congested(struct bdi_writeback_congested *congested, int sync) in set_wb_congested() argument
1002 if (!test_and_set_bit(bit, &congested->state)) in set_wb_congested()