Whamcloud - gitweb
LU-8275 tests: add flag to enable secret shared key for tests
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_quota_fmt.c
index e11c7ba..1fb6529 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2015, Intel Corporation.
  * Use is subject to license terms.
  *
  * Lustre administrative quota format.
@@ -64,7 +64,8 @@ static ssize_t quota_read_blk(const struct lu_env *env,
        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);
@@ -286,12 +287,10 @@ int walk_tree_dqentry(const struct lu_env *env, struct osd_object *obj,
                                                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;
        }
+       it->oiq_blk[depth + 1] = blk;
+       it->oiq_index[depth] = index;
 
 out_buf:
        freedqbuf(buf);