On Fri, Feb 02, 2007 at 08:19:50PM +0530, Kalpak Shah wrote: > +#define EXT3_INODE_SET_XTIME(xtime, extra_xtime, inode, raw_inode) \ > +do { \ > + (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \ > + \ > + if (offsetof(typeof(*raw_inode), extra_xtime) - \ > + offsetof(typeof(*raw_inode), i_extra_isize) + \ > + sizeof((raw_inode)->extra_xtime) <= \ > + le16_to_cpu((raw_inode)->i_extra_isize)) \ ^^^^^^^^^^^^^^^^^^^^^^^^^ > + (raw_inode)->extra_xtime = \ With 128-byte inodes, raw_inode->i_extra_isize is beyond the inode limit and the above will corrupt the filesystem. IMO, i_extra_isize from ext3_inode_info should be used instead of raw_inode->i_extra_isize. > +#define EXT3_INODE_GET_XTIME(xtime, extra_xtime, inode, raw_inode) \ > +do { \ > + (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \ > + \ > + if (offsetof(typeof(*raw_inode), extra_xtime) - \ > + offsetof(typeof(*raw_inode), i_extra_isize) + \ > + sizeof((raw_inode)->extra_xtime) <= \ > + le16_to_cpu((raw_inode)->i_extra_isize)) { \ ^^^^^^^^^^^^^^^^^^^^^^^^^ ditto Cheers, Johann - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html