> } else if (type == DIRTY_DENTS) { > - if (sbi->sb->s_bdi->wb_ctx_arr[0]->wb.dirty_exceeded) > - return false; > + for_each_bdi_wb_ctx(sbi->sb->s_bdi, bdi_wb_ctx) > + if (bdi_wb_ctx->wb.dirty_exceeded) > + return false; I think we need to figure out what the dirty_exceeded here and in the other places in f2fs and gfs2 is trying to do and factor that into well-documented core helpers instead of adding these loops in places that should not really poke into writeback internals.