[PATCH] linux-2.5.66/fs/cramfs/inode.c typecheck - int vs. struct

From: Adam Kelly (akelly@on-demand-tech.com)
Date: Wed Mar 26 2003 - 00:45:10 EST


Very minor change. GCC now does more type checking, so This just zeros a
timespec struct
so that i_mtime, etc will match types.

gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
compiling linux-2.5.66

 -Adam

--- inode.c.orig 2003-03-25 22:50:17.000000000 -0600
+++ inode.c 2003-03-25 23:00:50.000000000 -0600
@@ -44,6 +44,8 @@
 {
        struct inode * inode = new_inode(sb);
 
+ const struct timespec zero_timespec = {0};
+
        if (inode) {
                inode->i_mode = cramfs_inode->mode;
                inode->i_uid = cramfs_inode->uid;
@@ -51,7 +53,7 @@
                inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1;
                inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_gid = cramfs_inode->gid;
- inode->i_mtime = inode->i_atime = inode->i_ctime = 0;
+ inode->i_mtime = inode->i_atime = inode->i_ctime =
zero_timespec;
                inode->i_ino = CRAMINO(cramfs_inode);
                /* inode->i_nlink is left 1 - arguably wrong for
directories,
                   but it's the best we can do without reading the
directory

-
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/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:22 EST