Messages in this thread |  | | | Date | Mon, 17 May 2004 13:57:09 -0700 | | From | Andrew Morton <> | | Subject | Re: [PATCH] Quota fix 3 - quota file corruption |
| |
Jan Kara <jack@ucw.cz> wrote: > > + memset(&empty, 0, sizeof(struct v2_disk_dqblk)); > + if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk))) > + ddquot.dqb_itime = cpu_to_le64(1);
hm, OK.
Comparing structures for equality might not work right if the compiler added internal padding. However in this case the structure is six u32's followed by a couple of u64's so it will work out right. And it's an on-disk thing so it won't be changing in a hurry.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |