/* 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);
/* Header of new quota format */
struct v2_disk_dqheader {
- __u32 dqh_magic; /* Magic number identifying file */
- __u32 dqh_version; /* File version */
+ __le32 dqh_magic; /* Magic number identifying file */
+ __le32 dqh_version; /* File version */
};
static int v1_check_quota_file(struct super_block *sb, int type)