Lines Matching refs:cnt

404 	int ret, err, cnt;
408 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
409 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
421 unsigned int cnt;
423 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
424 dqput(dquot[cnt]);
688 int cnt;
693 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
694 if (type != -1 && cnt != type)
696 if (!sb_has_quota_active(sb, cnt))
700 list_replace_init(&dqopt->info[cnt].dqi_dirty_list, &dirty);
728 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
729 if ((cnt == type || type == -1) && sb_has_quota_active(sb, cnt)
730 && info_dirty(&dqopt->info[cnt]))
731 sb->dq_op->write_info(sb, cnt);
742 int cnt;
767 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
768 if (type != -1 && cnt != type)
770 if (!sb_has_quota_active(sb, cnt))
772 inode_lock(dqopt->files[cnt]);
773 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0);
774 inode_unlock(dqopt->files[cnt]);
1017 int cnt;
1025 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1026 if (!dquots[cnt])
1467 int cnt, init_needed = 0;
1480 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1486 if (type != -1 && cnt != type)
1493 if (dquots[cnt])
1496 if (!sb_has_quota_active(sb, cnt))
1501 switch (cnt) {
1524 got[cnt] = dquot;
1534 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1535 if (type != -1 && cnt != type)
1538 if (!sb_has_quota_active(sb, cnt))
1541 if (!got[cnt])
1543 if (!dquots[cnt]) {
1544 rcu_assign_pointer(dquots[cnt], got[cnt]);
1545 got[cnt] = NULL;
1553 dquots[cnt], &dquot_srcu,
1607 int cnt;
1612 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1613 put[cnt] = srcu_dereference_check(dquots[cnt], &dquot_srcu,
1615 rcu_assign_pointer(dquots[cnt], NULL);
1624 int cnt;
1637 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1638 if (dquots[cnt])
1642 if (cnt < MAXQUOTAS)
1693 int cnt, ret = 0, index;
1710 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1711 warn[cnt].w_type = QUOTA_NL_NOWARN;
1716 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1717 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1721 ret = dquot_add_space(dquot, 0, number, flags, &warn[cnt]);
1723 ret = dquot_add_space(dquot, number, 0, flags, &warn[cnt]);
1727 for (cnt--; cnt >= 0; cnt--) {
1728 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1764 int cnt, ret = 0, index;
1771 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
1772 warn[cnt].w_type = QUOTA_NL_NOWARN;
1777 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1778 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1781 ret = dquot_add_inodes(dquot, 1, &warn[cnt]);
1783 for (cnt--; cnt >= 0; cnt--) {
1784 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1813 int cnt, index;
1827 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1828 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1855 int cnt, index;
1869 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1870 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1895 unsigned int cnt;
1915 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1918 warn[cnt].w_type = QUOTA_NL_NOWARN;
1919 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1925 prepare_warning(&warn[cnt], dquot, wtype);
1952 unsigned int cnt;
1964 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1966 warn[cnt].w_type = QUOTA_NL_NOWARN;
1967 dquot = srcu_dereference(dquots[cnt], &dquot_srcu);
1973 prepare_warning(&warn[cnt], dquot, wtype);
2003 int cnt, index, ret = 0;
2019 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2020 warn_to[cnt].w_type = QUOTA_NL_NOWARN;
2021 warn_from_inodes[cnt].w_type = QUOTA_NL_NOWARN;
2022 warn_from_space[cnt].w_type = QUOTA_NL_NOWARN;
2039 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2043 if (!transfer_to[cnt])
2046 if (!sb_has_quota_active(inode->i_sb, cnt))
2048 is_valid[cnt] = 1;
2049 transfer_from[cnt] = srcu_dereference_check(dquots[cnt],
2051 ret = dquot_add_inodes(transfer_to[cnt], inode_usage,
2052 &warn_to[cnt]);
2055 ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space,
2056 DQUOT_SPACE_WARN, &warn_to[cnt]);
2058 spin_lock(&transfer_to[cnt]->dq_dqb_lock);
2059 dquot_decr_inodes(transfer_to[cnt], inode_usage);
2060 spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
2066 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2067 if (!is_valid[cnt])
2070 if (transfer_from[cnt]) {
2073 spin_lock(&transfer_from[cnt]->dq_dqb_lock);
2074 wtype = info_idq_free(transfer_from[cnt], inode_usage);
2076 prepare_warning(&warn_from_inodes[cnt],
2077 transfer_from[cnt], wtype);
2078 wtype = info_bdq_free(transfer_from[cnt],
2081 prepare_warning(&warn_from_space[cnt],
2082 transfer_from[cnt], wtype);
2083 dquot_decr_inodes(transfer_from[cnt], inode_usage);
2084 dquot_decr_space(transfer_from[cnt], cur_space);
2085 dquot_free_reserved_space(transfer_from[cnt],
2087 spin_unlock(&transfer_from[cnt]->dq_dqb_lock);
2089 rcu_assign_pointer(dquots[cnt], transfer_to[cnt]);
2108 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
2109 if (is_valid[cnt])
2110 transfer_to[cnt] = transfer_from[cnt];
2114 for (cnt--; cnt >= 0; cnt--) {
2115 if (!is_valid[cnt])
2117 spin_lock(&transfer_to[cnt]->dq_dqb_lock);
2118 dquot_decr_inodes(transfer_to[cnt], inode_usage);
2119 dquot_decr_space(transfer_to[cnt], cur_space);
2120 dquot_free_reserved_space(transfer_to[cnt], rsv_space);
2121 spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
2252 int cnt;
2274 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2275 if (type != -1 && cnt != type)
2277 if (!sb_has_quota_loaded(sb, cnt))
2283 dquot_state_flag(DQUOT_SUSPENDED, cnt);
2287 dqopt->flags &= ~dquot_state_flag(flags, cnt);
2289 if (!sb_has_quota_loaded(sb, cnt) &&
2290 sb_has_quota_suspended(sb, cnt)) {
2292 DQUOT_SUSPENDED, cnt);
2294 vfs_cleanup_quota_inode(sb, cnt);
2301 if (sb_has_quota_loaded(sb, cnt) && !(flags & DQUOT_SUSPENDED))
2305 drop_dquot_ref(sb, cnt);
2306 invalidate_dquots(sb, cnt);
2311 if (info_dirty(&dqopt->info[cnt]))
2312 sb->dq_op->write_info(sb, cnt);
2313 if (dqopt->ops[cnt]->free_file_info)
2314 dqopt->ops[cnt]->free_file_info(sb, cnt);
2315 put_quota_format(dqopt->info[cnt].dqi_format);
2316 dqopt->info[cnt].dqi_flags = 0;
2317 dqopt->info[cnt].dqi_igrace = 0;
2318 dqopt->info[cnt].dqi_bgrace = 0;
2319 dqopt->ops[cnt] = NULL;
2336 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
2337 if (!sb_has_quota_loaded(sb, cnt) && dqopt->files[cnt]) {
2338 inode_lock(dqopt->files[cnt]);
2339 truncate_inode_pages(&dqopt->files[cnt]->i_data, 0);
2340 inode_unlock(dqopt->files[cnt]);
2349 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
2350 if (!sb_has_quota_loaded(sb, cnt))
2351 vfs_cleanup_quota_inode(sb, cnt);
2515 int ret = 0, cnt;
2522 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
2523 if (type != -1 && cnt != type)
2525 if (!sb_has_quota_suspended(sb, cnt))
2531 cnt);
2532 dqopt->flags &= ~dquot_state_flag(DQUOT_STATE_FLAGS, cnt);
2535 flags = dquot_generic_flag(flags, cnt);
2536 ret = dquot_load_quota_sb(sb, cnt, dqopt->info[cnt].dqi_fmt_id,
2539 vfs_cleanup_quota_inode(sb, cnt);