patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / fs / quota_v1.c
index 2ffb492..7c7de91 100644 (file)
@@ -52,6 +52,8 @@ static int v1_read_dqblk(struct dquot *dquot)
 
        /* Now we are sure filp is valid */
        offset = v1_dqoff(dquot->dq_id);
+       /* Set structure to 0s in case read fails/is after end of file */
+       memset(&dqblk, 0, sizeof(struct v1_disk_dqblk));
        fs = get_fs();
        set_fs(KERNEL_DS);
        filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);