diff options
author | Petr Pisar <ppisar@redhat.com> | 2011-04-07 16:26:51 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-04-08 20:11:39 +0200 |
commit | e482f256411dba6a9d647e6df7f24eef8af3d59b (patch) | |
tree | 1b4229ae825227c364bd68aff32615b1a7271c7f | |
parent | ebaca041565c1b81a16b1e7e743e56050b0158b6 (diff) | |
download | linuxquota-e482f256411dba6a9d647e6df7f24eef8af3d59b.tar.gz |
Initialize v2r1 ddquot padding in dump
v2r1_mem2diskdqblk() that writes quota structure into memory block
calls tree_entry_unused() to decide the structure is in use (and
rewrites UID then). However tree_entry_unused() scan can be spoiled
because padding is not initialized and contains random value.
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | quotaio_v2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/quotaio_v2.c b/quotaio_v2.c index 2242c88..06be04e 100644 --- a/quotaio_v2.c +++ b/quotaio_v2.c @@ -144,6 +144,7 @@ static void v2r1_mem2diskdqblk(void *dp, struct dquot *dquot) d->dqb_itime = __cpu_to_le64(m->dqb_itime); d->dqb_btime = __cpu_to_le64(m->dqb_btime); d->dqb_id = __cpu_to_le32(dquot->dq_id); + d->dqb_pad = 0; /* Initialize because of qtree_entry_unused() scan */ if (qtree_entry_unused(&dquot->dq_h->qh_info.u.v2_mdqi.dqi_qtree, dp)) d->dqb_itime = __cpu_to_le64(1); } |