* GPL HEADER END
*/
/*
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
* Use is subject to license terms.
*
* Lustre administrative quota format.
ENTRY;
memset(buf, 0, LUSTRE_DQBLKSIZE);
- LASSERTF((type == USRQUOTA || type == GRPQUOTA), "type=%d\n", type);
+ LASSERTF((type == USRQUOTA || type == GRPQUOTA || type == PRJQUOTA),
+ "type=%d\n", type);
ret = sb->s_op->quota_read(sb, type, buf, LUSTRE_DQBLKSIZE,
blk << LUSTRE_DQBLKSIZE_BITS);
}
ret = 1;
- for (; index <= 0xff && ret > 0; index++) {
+ for (; index <= 0xff; index++) {
blk = le32_to_cpu(ref[index]);
if (!blk) /* No reference */
continue;
depth + 1, 0, it);
else
ret = walk_block_dqentry(env, obj, type, blk, 0, it);
- }
- if (ret == 0) { /* Entry found */
- it->oiq_blk[depth + 1] = blk;
- it->oiq_index[depth] = index;
+ if (ret <= 0)
+ break;
}
+ it->oiq_blk[depth + 1] = blk;
+ it->oiq_index[depth] = index;
+
out_buf:
freedqbuf(buf);
RETURN(ret);