lkml.org 
[lkml]   [2004]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 17 May 2004 13:57:09 -0700
FromAndrew Morton <>
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:03    [from the cache]
©2003-2010