diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-02 11:59:28 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:34:33 -0500 |
commit | 294caaa3b8304c0a14c5039691caf23363bd9369 (patch) | |
tree | fbc47d2b1e5bc0c0840881573581b922a804505c /fs | |
parent | bfded27ba010d1c3b0aa3843f97dc9b80de751be (diff) |
[GFS2] Tidy up 0 initialisations in inode.c
We don't need to use endian conversions for 0 initialisations
when creating a new on-disk inode.
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/inode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index e467780837e6..faf9b9ed791d 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -673,15 +673,15 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, | |||
673 | di->di_mode = cpu_to_be32(mode); | 673 | di->di_mode = cpu_to_be32(mode); |
674 | di->di_uid = cpu_to_be32(uid); | 674 | di->di_uid = cpu_to_be32(uid); |
675 | di->di_gid = cpu_to_be32(gid); | 675 | di->di_gid = cpu_to_be32(gid); |
676 | di->di_nlink = cpu_to_be32(0); | 676 | di->di_nlink = 0; |
677 | di->di_size = cpu_to_be64(0); | 677 | di->di_size = 0; |
678 | di->di_blocks = cpu_to_be64(1); | 678 | di->di_blocks = cpu_to_be64(1); |
679 | di->di_atime = di->di_mtime = di->di_ctime = cpu_to_be64(get_seconds()); | 679 | di->di_atime = di->di_mtime = di->di_ctime = cpu_to_be64(get_seconds()); |
680 | di->di_major = cpu_to_be32(MAJOR(dev)); | 680 | di->di_major = cpu_to_be32(MAJOR(dev)); |
681 | di->di_minor = cpu_to_be32(MINOR(dev)); | 681 | di->di_minor = cpu_to_be32(MINOR(dev)); |
682 | di->di_goal_meta = di->di_goal_data = cpu_to_be64(inum->no_addr); | 682 | di->di_goal_meta = di->di_goal_data = cpu_to_be64(inum->no_addr); |
683 | di->di_generation = cpu_to_be64(*generation); | 683 | di->di_generation = cpu_to_be64(*generation); |
684 | di->di_flags = cpu_to_be32(0); | 684 | di->di_flags = 0; |
685 | 685 | ||
686 | if (S_ISREG(mode)) { | 686 | if (S_ISREG(mode)) { |
687 | if ((dip->i_di.di_flags & GFS2_DIF_INHERIT_JDATA) || | 687 | if ((dip->i_di.di_flags & GFS2_DIF_INHERIT_JDATA) || |
@@ -699,13 +699,13 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl, | |||
699 | 699 | ||
700 | di->__pad1 = 0; | 700 | di->__pad1 = 0; |
701 | di->di_payload_format = cpu_to_be32(S_ISDIR(mode) ? GFS2_FORMAT_DE : 0); | 701 | di->di_payload_format = cpu_to_be32(S_ISDIR(mode) ? GFS2_FORMAT_DE : 0); |
702 | di->di_height = cpu_to_be32(0); | 702 | di->di_height = 0; |
703 | di->__pad2 = 0; | 703 | di->__pad2 = 0; |
704 | di->__pad3 = 0; | 704 | di->__pad3 = 0; |
705 | di->di_depth = cpu_to_be16(0); | 705 | di->di_depth = 0; |
706 | di->di_entries = cpu_to_be32(0); | 706 | di->di_entries = 0; |
707 | memset(&di->__pad4, 0, sizeof(di->__pad4)); | 707 | memset(&di->__pad4, 0, sizeof(di->__pad4)); |
708 | di->di_eattr = cpu_to_be64(0); | 708 | di->di_eattr = 0; |
709 | memset(&di->di_reserved, 0, sizeof(di->di_reserved)); | 709 | memset(&di->di_reserved, 0, sizeof(di->di_reserved)); |
710 | 710 | ||
711 | brelse(dibh); | 711 | brelse(dibh); |