Lines Matching refs:cnt
404 int ret, err, cnt; in mark_all_dquot_dirty() local
408 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in mark_all_dquot_dirty()
409 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in mark_all_dquot_dirty()
421 unsigned int cnt; in dqput_all() local
423 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dqput_all()
424 dqput(dquot[cnt]); in dqput_all()
688 int cnt; in dquot_writeback_dquots() local
695 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_writeback_dquots()
696 if (type != -1 && cnt != type) in dquot_writeback_dquots()
698 if (!sb_has_quota_active(sb, cnt)) in dquot_writeback_dquots()
702 list_replace_init(&dqopt->info[cnt].dqi_dirty_list, &dirty); in dquot_writeback_dquots()
730 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_writeback_dquots()
731 if ((cnt == type || type == -1) && sb_has_quota_active(sb, cnt) in dquot_writeback_dquots()
732 && info_dirty(&dqopt->info[cnt])) in dquot_writeback_dquots()
733 sb->dq_op->write_info(sb, cnt); in dquot_writeback_dquots()
744 int cnt; in dquot_quota_sync() local
769 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_quota_sync()
770 if (type != -1 && cnt != type) in dquot_quota_sync()
772 if (!sb_has_quota_active(sb, cnt)) in dquot_quota_sync()
774 inode_lock(dqopt->files[cnt]); in dquot_quota_sync()
775 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0); in dquot_quota_sync()
776 inode_unlock(dqopt->files[cnt]); in dquot_quota_sync()
1018 int cnt; in dqinit_needed() local
1026 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dqinit_needed()
1027 if (!dquots[cnt]) in dqinit_needed()
1468 int cnt, init_needed = 0; in __dquot_initialize() local
1481 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_initialize()
1487 if (type != -1 && cnt != type) in __dquot_initialize()
1494 if (dquots[cnt]) in __dquot_initialize()
1497 if (!sb_has_quota_active(sb, cnt)) in __dquot_initialize()
1502 switch (cnt) { in __dquot_initialize()
1525 got[cnt] = dquot; in __dquot_initialize()
1535 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_initialize()
1536 if (type != -1 && cnt != type) in __dquot_initialize()
1539 if (!sb_has_quota_active(sb, cnt)) in __dquot_initialize()
1542 if (!got[cnt]) in __dquot_initialize()
1544 if (!dquots[cnt]) { in __dquot_initialize()
1545 rcu_assign_pointer(dquots[cnt], got[cnt]); in __dquot_initialize()
1546 got[cnt] = NULL; in __dquot_initialize()
1554 dquots[cnt], &dquot_srcu, in __dquot_initialize()
1608 int cnt; in __dquot_drop() local
1613 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_drop()
1614 put[cnt] = srcu_dereference_check(dquots[cnt], &dquot_srcu, in __dquot_drop()
1616 rcu_assign_pointer(dquots[cnt], NULL); in __dquot_drop()
1625 int cnt; in dquot_drop() local
1638 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_drop()
1639 if (dquots[cnt]) in dquot_drop()
1643 if (cnt < MAXQUOTAS) in dquot_drop()
1694 int cnt, ret = 0, index; in __dquot_alloc_space() local
1711 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in __dquot_alloc_space()
1712 warn[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_alloc_space()
1717 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_alloc_space()
1718 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in __dquot_alloc_space()
1722 ret = dquot_add_space(dquot, 0, number, flags, &warn[cnt]); in __dquot_alloc_space()
1724 ret = dquot_add_space(dquot, number, 0, flags, &warn[cnt]); in __dquot_alloc_space()
1728 for (cnt--; cnt >= 0; cnt--) { in __dquot_alloc_space()
1729 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in __dquot_alloc_space()
1765 int cnt, ret = 0, index; in dquot_alloc_inode() local
1772 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_alloc_inode()
1773 warn[cnt].w_type = QUOTA_NL_NOWARN; in dquot_alloc_inode()
1778 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_alloc_inode()
1779 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in dquot_alloc_inode()
1782 ret = dquot_add_inodes(dquot, 1, &warn[cnt]); in dquot_alloc_inode()
1784 for (cnt--; cnt >= 0; cnt--) { in dquot_alloc_inode()
1785 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in dquot_alloc_inode()
1814 int cnt, index; in dquot_claim_space_nodirty() local
1828 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_claim_space_nodirty()
1829 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in dquot_claim_space_nodirty()
1856 int cnt, index; in dquot_reclaim_space_nodirty() local
1870 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_reclaim_space_nodirty()
1871 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in dquot_reclaim_space_nodirty()
1896 unsigned int cnt; in __dquot_free_space() local
1916 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_free_space()
1919 warn[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_free_space()
1920 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in __dquot_free_space()
1926 prepare_warning(&warn[cnt], dquot, wtype); in __dquot_free_space()
1953 unsigned int cnt; in dquot_free_inode() local
1965 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_free_inode()
1967 warn[cnt].w_type = QUOTA_NL_NOWARN; in dquot_free_inode()
1968 dquot = srcu_dereference(dquots[cnt], &dquot_srcu); in dquot_free_inode()
1974 prepare_warning(&warn[cnt], dquot, wtype); in dquot_free_inode()
2004 int cnt, index, ret = 0; in __dquot_transfer() local
2020 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_transfer()
2021 warn_to[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_transfer()
2022 warn_from_inodes[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_transfer()
2023 warn_from_space[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_transfer()
2040 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_transfer()
2044 if (!transfer_to[cnt]) in __dquot_transfer()
2047 if (!sb_has_quota_active(inode->i_sb, cnt)) in __dquot_transfer()
2049 is_valid[cnt] = 1; in __dquot_transfer()
2050 transfer_from[cnt] = srcu_dereference_check(dquots[cnt], in __dquot_transfer()
2052 ret = dquot_add_inodes(transfer_to[cnt], inode_usage, in __dquot_transfer()
2053 &warn_to[cnt]); in __dquot_transfer()
2056 ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space, in __dquot_transfer()
2057 DQUOT_SPACE_WARN, &warn_to[cnt]); in __dquot_transfer()
2059 spin_lock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2060 dquot_decr_inodes(transfer_to[cnt], inode_usage); in __dquot_transfer()
2061 spin_unlock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2067 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_transfer()
2068 if (!is_valid[cnt]) in __dquot_transfer()
2071 if (transfer_from[cnt]) { in __dquot_transfer()
2074 spin_lock(&transfer_from[cnt]->dq_dqb_lock); in __dquot_transfer()
2075 wtype = info_idq_free(transfer_from[cnt], inode_usage); in __dquot_transfer()
2077 prepare_warning(&warn_from_inodes[cnt], in __dquot_transfer()
2078 transfer_from[cnt], wtype); in __dquot_transfer()
2079 wtype = info_bdq_free(transfer_from[cnt], in __dquot_transfer()
2082 prepare_warning(&warn_from_space[cnt], in __dquot_transfer()
2083 transfer_from[cnt], wtype); in __dquot_transfer()
2084 dquot_decr_inodes(transfer_from[cnt], inode_usage); in __dquot_transfer()
2085 dquot_decr_space(transfer_from[cnt], cur_space); in __dquot_transfer()
2086 dquot_free_reserved_space(transfer_from[cnt], in __dquot_transfer()
2088 spin_unlock(&transfer_from[cnt]->dq_dqb_lock); in __dquot_transfer()
2090 rcu_assign_pointer(dquots[cnt], transfer_to[cnt]); in __dquot_transfer()
2109 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in __dquot_transfer()
2110 if (is_valid[cnt]) in __dquot_transfer()
2111 transfer_to[cnt] = transfer_from[cnt]; in __dquot_transfer()
2115 for (cnt--; cnt >= 0; cnt--) { in __dquot_transfer()
2116 if (!is_valid[cnt]) in __dquot_transfer()
2118 spin_lock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2119 dquot_decr_inodes(transfer_to[cnt], inode_usage); in __dquot_transfer()
2120 dquot_decr_space(transfer_to[cnt], cur_space); in __dquot_transfer()
2121 dquot_free_reserved_space(transfer_to[cnt], rsv_space); in __dquot_transfer()
2122 spin_unlock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2253 int cnt; in dquot_disable() local
2275 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_disable()
2276 if (type != -1 && cnt != type) in dquot_disable()
2278 if (!sb_has_quota_loaded(sb, cnt)) in dquot_disable()
2284 dquot_state_flag(DQUOT_SUSPENDED, cnt); in dquot_disable()
2288 dqopt->flags &= ~dquot_state_flag(flags, cnt); in dquot_disable()
2290 if (!sb_has_quota_loaded(sb, cnt) && in dquot_disable()
2291 sb_has_quota_suspended(sb, cnt)) { in dquot_disable()
2293 DQUOT_SUSPENDED, cnt); in dquot_disable()
2295 vfs_cleanup_quota_inode(sb, cnt); in dquot_disable()
2302 if (sb_has_quota_loaded(sb, cnt) && !(flags & DQUOT_SUSPENDED)) in dquot_disable()
2306 drop_dquot_ref(sb, cnt); in dquot_disable()
2307 invalidate_dquots(sb, cnt); in dquot_disable()
2312 if (info_dirty(&dqopt->info[cnt])) in dquot_disable()
2313 sb->dq_op->write_info(sb, cnt); in dquot_disable()
2314 if (dqopt->ops[cnt]->free_file_info) in dquot_disable()
2315 dqopt->ops[cnt]->free_file_info(sb, cnt); in dquot_disable()
2316 put_quota_format(dqopt->info[cnt].dqi_format); in dquot_disable()
2317 dqopt->info[cnt].dqi_flags = 0; in dquot_disable()
2318 dqopt->info[cnt].dqi_igrace = 0; in dquot_disable()
2319 dqopt->info[cnt].dqi_bgrace = 0; in dquot_disable()
2320 dqopt->ops[cnt] = NULL; in dquot_disable()
2337 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_disable()
2338 if (!sb_has_quota_loaded(sb, cnt) && dqopt->files[cnt]) { in dquot_disable()
2339 inode_lock(dqopt->files[cnt]); in dquot_disable()
2340 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0); in dquot_disable()
2341 inode_unlock(dqopt->files[cnt]); in dquot_disable()
2350 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_disable()
2351 if (!sb_has_quota_loaded(sb, cnt)) in dquot_disable()
2352 vfs_cleanup_quota_inode(sb, cnt); in dquot_disable()
2516 int ret = 0, cnt; in dquot_resume() local
2523 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_resume()
2524 if (type != -1 && cnt != type) in dquot_resume()
2526 if (!sb_has_quota_suspended(sb, cnt)) in dquot_resume()
2532 cnt); in dquot_resume()
2533 dqopt->flags &= ~dquot_state_flag(DQUOT_STATE_FLAGS, cnt); in dquot_resume()
2536 flags = dquot_generic_flag(flags, cnt); in dquot_resume()
2537 ret = dquot_load_quota_sb(sb, cnt, dqopt->info[cnt].dqi_fmt_id, in dquot_resume()
2540 vfs_cleanup_quota_inode(sb, cnt); in dquot_resume()