Lines Matching refs:cnt
406 int ret, err, cnt;
410 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
411 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
423 unsigned int cnt;
425 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
426 dqput(dquot[cnt]);
690 int cnt;
695 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
696 if (type != -1 && cnt != type)
698 if (!sb_has_quota_active(sb, cnt))
702 list_replace_init(&dqopt->info[cnt].dqi_dirty_list, &dirty);
730 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
731 if ((cnt == type || type == -1) && sb_has_quota_active(sb, cnt)
732 && info_dirty(&dqopt->info[cnt]))
733 sb->dq_op->write_info(sb, cnt);
744 int cnt;
769 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
770 if (type != -1 && cnt != type)
772 if (!sb_has_quota_active(sb, cnt))
774 inode_lock(dqopt->files[cnt]);
775 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0);
776 inode_unlock(dqopt->files[cnt]);
1019 int cnt;
1027 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1028 if (!dquots[cnt])
1519 int cnt, init_needed = 0;
1531 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1537 if (type != -1 && cnt != type)
1544 if (dquots[cnt])
1547 if (!sb_has_quota_active(sb, cnt))
1552 switch (cnt) {
1575 got[cnt] = dquot;
1585 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1586 if (type != -1 && cnt != type)
1589 if (!sb_has_quota_active(sb, cnt))
1592 if (!got[cnt])
1594 if (!dquots[cnt]) {
1595 dquots[cnt] = got[cnt];
1596 got[cnt] = NULL;
1606 spin_lock(&dquots[cnt]->dq_dqb_lock);
1607 dquots[cnt]->dq_dqb.dqb_rsvspace += rsv;
1608 spin_unlock(&dquots[cnt]->dq_dqb_lock);
1654 int cnt;
1659 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1660 put[cnt] = dquots[cnt];
1661 dquots[cnt] = NULL;
1670 int cnt;
1683 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1684 if (dquots[cnt])
1688 if (cnt < MAXQUOTAS)
1739 int cnt, ret = 0, index;
1756 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1757 warn[cnt].w_type = QUOTA_NL_NOWARN;
1762 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1763 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1767 ret = dquot_add_space(dquot, 0, number, flags, &warn[cnt]);
1769 ret = dquot_add_space(dquot, number, 0, flags, &warn[cnt]);
1773 for (cnt--; cnt >= 0; cnt--) {
1774 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1810 int cnt, ret = 0, index;
1817 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1818 warn[cnt].w_type = QUOTA_NL_NOWARN;
1823 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1824 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1827 ret = dquot_add_inodes(dquot, 1, &warn[cnt]);
1829 for (cnt--; cnt >= 0; cnt--) {
1830 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1859 int cnt, index;
1873 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1874 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1901 int cnt, index;
1915 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1916 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1941 unsigned int cnt;
1961 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1964 warn[cnt].w_type = QUOTA_NL_NOWARN;
1965 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1971 prepare_warning(&warn[cnt], dquot, wtype);
1998 unsigned int cnt;
2010 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2012 warn[cnt].w_type = QUOTA_NL_NOWARN;
2013 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
2019 prepare_warning(&warn[cnt], dquot, wtype);
2048 int cnt, index, ret = 0;
2064 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2065 warn_to[cnt].w_type = QUOTA_NL_NOWARN;
2066 warn_from_inodes[cnt].w_type = QUOTA_NL_NOWARN;
2067 warn_from_space[cnt].w_type = QUOTA_NL_NOWARN;
2083 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2087 if (!transfer_to[cnt])
2090 if (!sb_has_quota_active(inode->i_sb, cnt))
2092 is_valid[cnt] = 1;
2093 transfer_from[cnt] = i_dquot(inode)[cnt];
2094 ret = dquot_add_inodes(transfer_to[cnt], inode_usage,
2095 &warn_to[cnt]);
2098 ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space,
2099 DQUOT_SPACE_WARN, &warn_to[cnt]);
2101 spin_lock(&transfer_to[cnt]->dq_dqb_lock);
2102 dquot_decr_inodes(transfer_to[cnt], inode_usage);
2103 spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
2109 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2110 if (!is_valid[cnt])
2113 if (transfer_from[cnt]) {
2116 spin_lock(&transfer_from[cnt]->dq_dqb_lock);
2117 wtype = info_idq_free(transfer_from[cnt], inode_usage);
2119 prepare_warning(&warn_from_inodes[cnt],
2120 transfer_from[cnt], wtype);
2121 wtype = info_bdq_free(transfer_from[cnt],
2124 prepare_warning(&warn_from_space[cnt],
2125 transfer_from[cnt], wtype);
2126 dquot_decr_inodes(transfer_from[cnt], inode_usage);
2127 dquot_decr_space(transfer_from[cnt], cur_space);
2128 dquot_free_reserved_space(transfer_from[cnt],
2130 spin_unlock(&transfer_from[cnt]->dq_dqb_lock);
2132 i_dquot(inode)[cnt] = transfer_to[cnt];
2151 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
2152 if (is_valid[cnt])
2153 transfer_to[cnt] = transfer_from[cnt];
2157 for (cnt--; cnt >= 0; cnt--) {
2158 if (!is_valid[cnt])
2160 spin_lock(&transfer_to[cnt]->dq_dqb_lock);
2161 dquot_decr_inodes(transfer_to[cnt], inode_usage);
2162 dquot_decr_space(transfer_to[cnt], cur_space);
2163 dquot_free_reserved_space(transfer_to[cnt], rsv_space);
2164 spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
2288 int cnt;
2310 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2311 if (type != -1 && cnt != type)
2313 if (!sb_has_quota_loaded(sb, cnt))
2319 dquot_state_flag(DQUOT_SUSPENDED, cnt);
2323 dqopt->flags &= ~dquot_state_flag(flags, cnt);
2325 if (!sb_has_quota_loaded(sb, cnt) &&
2326 sb_has_quota_suspended(sb, cnt)) {
2328 DQUOT_SUSPENDED, cnt);
2330 vfs_cleanup_quota_inode(sb, cnt);
2337 if (sb_has_quota_loaded(sb, cnt) && !(flags & DQUOT_SUSPENDED))
2341 drop_dquot_ref(sb, cnt);
2342 invalidate_dquots(sb, cnt);
2347 if (info_dirty(&dqopt->info[cnt]))
2348 sb->dq_op->write_info(sb, cnt);
2349 if (dqopt->ops[cnt]->free_file_info)
2350 dqopt->ops[cnt]->free_file_info(sb, cnt);
2351 put_quota_format(dqopt->info[cnt].dqi_format);
2352 dqopt->info[cnt].dqi_flags = 0;
2353 dqopt->info[cnt].dqi_igrace = 0;
2354 dqopt->info[cnt].dqi_bgrace = 0;
2355 dqopt->ops[cnt] = NULL;
2372 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
2373 if (!sb_has_quota_loaded(sb, cnt) && dqopt->files[cnt]) {
2374 inode_lock(dqopt->files[cnt]);
2375 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0);
2376 inode_unlock(dqopt->files[cnt]);
2385 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
2386 if (!sb_has_quota_loaded(sb, cnt))
2387 vfs_cleanup_quota_inode(sb, cnt);
2552 int ret = 0, cnt;
2559 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2560 if (type != -1 && cnt != type)
2562 if (!sb_has_quota_suspended(sb, cnt))
2568 cnt);
2569 dqopt->flags &= ~dquot_state_flag(DQUOT_STATE_FLAGS, cnt);
2572 flags = dquot_generic_flag(flags, cnt);
2573 ret = dquot_load_quota_sb(sb, cnt, dqopt->info[cnt].dqi_fmt_id,
2576 vfs_cleanup_quota_inode(sb, cnt);