• Home
  • Raw
  • Download

Lines Matching refs:cnt

378 	int ret, err, cnt;  in mark_all_dquot_dirty()  local
381 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in mark_all_dquot_dirty()
382 if (dquot[cnt]) in mark_all_dquot_dirty()
384 ret = mark_dquot_dirty(dquot[cnt]); in mark_all_dquot_dirty()
393 unsigned int cnt; in dqput_all() local
395 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dqput_all()
396 dqput(dquot[cnt]); in dqput_all()
629 int cnt; in dquot_writeback_dquots() local
634 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_writeback_dquots()
635 if (type != -1 && cnt != type) in dquot_writeback_dquots()
637 if (!sb_has_quota_active(sb, cnt)) in dquot_writeback_dquots()
641 list_replace_init(&dqopt->info[cnt].dqi_dirty_list, &dirty); in dquot_writeback_dquots()
670 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_writeback_dquots()
671 if ((cnt == type || type == -1) && sb_has_quota_active(sb, cnt) in dquot_writeback_dquots()
672 && info_dirty(&dqopt->info[cnt])) in dquot_writeback_dquots()
673 sb->dq_op->write_info(sb, cnt); in dquot_writeback_dquots()
684 int cnt; in dquot_quota_sync() local
704 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_quota_sync()
705 if (type != -1 && cnt != type) in dquot_quota_sync()
707 if (!sb_has_quota_active(sb, cnt)) in dquot_quota_sync()
709 inode_lock(dqopt->files[cnt]); in dquot_quota_sync()
710 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0); in dquot_quota_sync()
711 inode_unlock(dqopt->files[cnt]); in dquot_quota_sync()
933 int cnt; in dqinit_needed() local
941 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dqinit_needed()
942 if (!dquots[cnt]) in dqinit_needed()
1433 int cnt, init_needed = 0; in __dquot_initialize() local
1445 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_initialize()
1451 if (type != -1 && cnt != type) in __dquot_initialize()
1458 if (dquots[cnt]) in __dquot_initialize()
1461 if (!sb_has_quota_active(sb, cnt)) in __dquot_initialize()
1466 switch (cnt) { in __dquot_initialize()
1489 got[cnt] = dquot; in __dquot_initialize()
1499 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_initialize()
1500 if (type != -1 && cnt != type) in __dquot_initialize()
1503 if (!sb_has_quota_active(sb, cnt)) in __dquot_initialize()
1506 if (!got[cnt]) in __dquot_initialize()
1508 if (!dquots[cnt]) { in __dquot_initialize()
1509 dquots[cnt] = got[cnt]; in __dquot_initialize()
1510 got[cnt] = NULL; in __dquot_initialize()
1520 spin_lock(&dquots[cnt]->dq_dqb_lock); in __dquot_initialize()
1521 dquots[cnt]->dq_dqb.dqb_rsvspace += rsv; in __dquot_initialize()
1522 spin_unlock(&dquots[cnt]->dq_dqb_lock); in __dquot_initialize()
1568 int cnt; in __dquot_drop() local
1573 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_drop()
1574 put[cnt] = dquots[cnt]; in __dquot_drop()
1575 dquots[cnt] = NULL; in __dquot_drop()
1584 int cnt; in dquot_drop() local
1597 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_drop()
1598 if (dquots[cnt]) in dquot_drop()
1602 if (cnt < MAXQUOTAS) in dquot_drop()
1653 int cnt, ret = 0, index; in __dquot_alloc_space() local
1669 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in __dquot_alloc_space()
1670 warn[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_alloc_space()
1675 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_alloc_space()
1676 if (!dquots[cnt]) in __dquot_alloc_space()
1679 ret = dquot_add_space(dquots[cnt], 0, number, flags, in __dquot_alloc_space()
1680 &warn[cnt]); in __dquot_alloc_space()
1682 ret = dquot_add_space(dquots[cnt], number, 0, flags, in __dquot_alloc_space()
1683 &warn[cnt]); in __dquot_alloc_space()
1687 for (cnt--; cnt >= 0; cnt--) { in __dquot_alloc_space()
1688 if (!dquots[cnt]) in __dquot_alloc_space()
1690 spin_lock(&dquots[cnt]->dq_dqb_lock); in __dquot_alloc_space()
1692 dquot_free_reserved_space(dquots[cnt], in __dquot_alloc_space()
1695 dquot_decr_space(dquots[cnt], number); in __dquot_alloc_space()
1696 spin_unlock(&dquots[cnt]->dq_dqb_lock); in __dquot_alloc_space()
1724 int cnt, ret = 0, index; in dquot_alloc_inode() local
1730 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_alloc_inode()
1731 warn[cnt].w_type = QUOTA_NL_NOWARN; in dquot_alloc_inode()
1736 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_alloc_inode()
1737 if (!dquots[cnt]) in dquot_alloc_inode()
1739 ret = dquot_add_inodes(dquots[cnt], 1, &warn[cnt]); in dquot_alloc_inode()
1741 for (cnt--; cnt >= 0; cnt--) { in dquot_alloc_inode()
1742 if (!dquots[cnt]) in dquot_alloc_inode()
1745 spin_lock(&dquots[cnt]->dq_dqb_lock); in dquot_alloc_inode()
1746 dquot_decr_inodes(dquots[cnt], 1); in dquot_alloc_inode()
1747 spin_unlock(&dquots[cnt]->dq_dqb_lock); in dquot_alloc_inode()
1769 int cnt, index; in dquot_claim_space_nodirty() local
1783 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_claim_space_nodirty()
1784 if (dquots[cnt]) { in dquot_claim_space_nodirty()
1785 struct dquot *dquot = dquots[cnt]; in dquot_claim_space_nodirty()
1811 int cnt, index; in dquot_reclaim_space_nodirty() local
1825 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_reclaim_space_nodirty()
1826 if (dquots[cnt]) { in dquot_reclaim_space_nodirty()
1827 struct dquot *dquot = dquots[cnt]; in dquot_reclaim_space_nodirty()
1852 unsigned int cnt; in __dquot_free_space() local
1871 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_free_space()
1874 warn[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_free_space()
1875 if (!dquots[cnt]) in __dquot_free_space()
1877 spin_lock(&dquots[cnt]->dq_dqb_lock); in __dquot_free_space()
1878 wtype = info_bdq_free(dquots[cnt], number); in __dquot_free_space()
1880 prepare_warning(&warn[cnt], dquots[cnt], wtype); in __dquot_free_space()
1882 dquot_free_reserved_space(dquots[cnt], number); in __dquot_free_space()
1884 dquot_decr_space(dquots[cnt], number); in __dquot_free_space()
1885 spin_unlock(&dquots[cnt]->dq_dqb_lock); in __dquot_free_space()
1907 unsigned int cnt; in dquot_free_inode() local
1918 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_free_inode()
1921 warn[cnt].w_type = QUOTA_NL_NOWARN; in dquot_free_inode()
1922 if (!dquots[cnt]) in dquot_free_inode()
1924 spin_lock(&dquots[cnt]->dq_dqb_lock); in dquot_free_inode()
1925 wtype = info_idq_free(dquots[cnt], 1); in dquot_free_inode()
1927 prepare_warning(&warn[cnt], dquots[cnt], wtype); in dquot_free_inode()
1928 dquot_decr_inodes(dquots[cnt], 1); in dquot_free_inode()
1929 spin_unlock(&dquots[cnt]->dq_dqb_lock); in dquot_free_inode()
1956 int cnt, ret = 0; in __dquot_transfer() local
1972 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_transfer()
1973 warn_to[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_transfer()
1974 warn_from_inodes[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_transfer()
1975 warn_from_space[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_transfer()
1991 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_transfer()
1995 if (!transfer_to[cnt]) in __dquot_transfer()
1998 if (!sb_has_quota_active(inode->i_sb, cnt)) in __dquot_transfer()
2000 is_valid[cnt] = 1; in __dquot_transfer()
2001 transfer_from[cnt] = i_dquot(inode)[cnt]; in __dquot_transfer()
2002 ret = dquot_add_inodes(transfer_to[cnt], inode_usage, in __dquot_transfer()
2003 &warn_to[cnt]); in __dquot_transfer()
2006 ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space, in __dquot_transfer()
2007 DQUOT_SPACE_WARN, &warn_to[cnt]); in __dquot_transfer()
2009 spin_lock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2010 dquot_decr_inodes(transfer_to[cnt], inode_usage); in __dquot_transfer()
2011 spin_unlock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2017 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in __dquot_transfer()
2018 if (!is_valid[cnt]) in __dquot_transfer()
2021 if (transfer_from[cnt]) { in __dquot_transfer()
2024 spin_lock(&transfer_from[cnt]->dq_dqb_lock); in __dquot_transfer()
2025 wtype = info_idq_free(transfer_from[cnt], inode_usage); in __dquot_transfer()
2027 prepare_warning(&warn_from_inodes[cnt], in __dquot_transfer()
2028 transfer_from[cnt], wtype); in __dquot_transfer()
2029 wtype = info_bdq_free(transfer_from[cnt], in __dquot_transfer()
2032 prepare_warning(&warn_from_space[cnt], in __dquot_transfer()
2033 transfer_from[cnt], wtype); in __dquot_transfer()
2034 dquot_decr_inodes(transfer_from[cnt], inode_usage); in __dquot_transfer()
2035 dquot_decr_space(transfer_from[cnt], cur_space); in __dquot_transfer()
2036 dquot_free_reserved_space(transfer_from[cnt], in __dquot_transfer()
2038 spin_unlock(&transfer_from[cnt]->dq_dqb_lock); in __dquot_transfer()
2040 i_dquot(inode)[cnt] = transfer_to[cnt]; in __dquot_transfer()
2051 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in __dquot_transfer()
2052 if (is_valid[cnt]) in __dquot_transfer()
2053 transfer_to[cnt] = transfer_from[cnt]; in __dquot_transfer()
2057 for (cnt--; cnt >= 0; cnt--) { in __dquot_transfer()
2058 if (!is_valid[cnt]) in __dquot_transfer()
2060 spin_lock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2061 dquot_decr_inodes(transfer_to[cnt], inode_usage); in __dquot_transfer()
2062 dquot_decr_space(transfer_to[cnt], cur_space); in __dquot_transfer()
2063 dquot_free_reserved_space(transfer_to[cnt], rsv_space); in __dquot_transfer()
2064 spin_unlock(&transfer_to[cnt]->dq_dqb_lock); in __dquot_transfer()
2172 int cnt, ret = 0; in dquot_disable() local
2195 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_disable()
2196 toputinode[cnt] = NULL; in dquot_disable()
2197 if (type != -1 && cnt != type) in dquot_disable()
2199 if (!sb_has_quota_loaded(sb, cnt)) in dquot_disable()
2205 dquot_state_flag(DQUOT_SUSPENDED, cnt); in dquot_disable()
2209 dqopt->flags &= ~dquot_state_flag(flags, cnt); in dquot_disable()
2211 if (!sb_has_quota_loaded(sb, cnt) && in dquot_disable()
2212 sb_has_quota_suspended(sb, cnt)) { in dquot_disable()
2214 DQUOT_SUSPENDED, cnt); in dquot_disable()
2216 iput(dqopt->files[cnt]); in dquot_disable()
2217 dqopt->files[cnt] = NULL; in dquot_disable()
2224 if (sb_has_quota_loaded(sb, cnt) && !(flags & DQUOT_SUSPENDED)) in dquot_disable()
2228 drop_dquot_ref(sb, cnt); in dquot_disable()
2229 invalidate_dquots(sb, cnt); in dquot_disable()
2234 if (info_dirty(&dqopt->info[cnt])) in dquot_disable()
2235 sb->dq_op->write_info(sb, cnt); in dquot_disable()
2236 if (dqopt->ops[cnt]->free_file_info) in dquot_disable()
2237 dqopt->ops[cnt]->free_file_info(sb, cnt); in dquot_disable()
2238 put_quota_format(dqopt->info[cnt].dqi_format); in dquot_disable()
2240 toputinode[cnt] = dqopt->files[cnt]; in dquot_disable()
2241 if (!sb_has_quota_loaded(sb, cnt)) in dquot_disable()
2242 dqopt->files[cnt] = NULL; in dquot_disable()
2243 dqopt->info[cnt].dqi_flags = 0; in dquot_disable()
2244 dqopt->info[cnt].dqi_igrace = 0; in dquot_disable()
2245 dqopt->info[cnt].dqi_bgrace = 0; in dquot_disable()
2246 dqopt->ops[cnt] = NULL; in dquot_disable()
2263 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_disable()
2265 if (toputinode[cnt] && !sb_has_quota_loaded(sb, cnt)) { in dquot_disable()
2266 inode_lock(toputinode[cnt]); in dquot_disable()
2267 toputinode[cnt]->i_flags &= ~S_NOQUOTA; in dquot_disable()
2268 truncate_inode_pages(&toputinode[cnt]->i_data, 0); in dquot_disable()
2269 inode_unlock(toputinode[cnt]); in dquot_disable()
2270 mark_inode_dirty_sync(toputinode[cnt]); in dquot_disable()
2275 for (cnt = 0; cnt < MAXQUOTAS; cnt++) in dquot_disable()
2276 if (toputinode[cnt]) { in dquot_disable()
2285 iput(toputinode[cnt]); in dquot_disable()
2286 else if (!toputinode[cnt]->i_nlink) in dquot_disable()
2418 int ret = 0, cnt; in dquot_resume() local
2425 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { in dquot_resume()
2426 if (type != -1 && cnt != type) in dquot_resume()
2428 if (!sb_has_quota_suspended(sb, cnt)) in dquot_resume()
2431 inode = dqopt->files[cnt]; in dquot_resume()
2432 dqopt->files[cnt] = NULL; in dquot_resume()
2436 cnt); in dquot_resume()
2437 dqopt->flags &= ~dquot_state_flag(DQUOT_STATE_FLAGS, cnt); in dquot_resume()
2440 flags = dquot_generic_flag(flags, cnt); in dquot_resume()
2441 ret = vfs_load_quota_inode(inode, cnt, in dquot_resume()
2442 dqopt->info[cnt].dqi_fmt_id, flags); in dquot_resume()