X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=fs%2Fquota_v1.c;h=7c7de9102c39c7a301e7a3cfa11b8beec9e6307a;hp=2ffb492c83ac97545fc2244a6882937e1516e595;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9 diff --git a/fs/quota_v1.c b/fs/quota_v1.c index 2ffb492c8..7c7de9102 100644 --- a/fs/quota_v1.c +++ b/fs/quota_v1.c @@ -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);