diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-04-28 05:16:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:43 -0400 |
commit | 31f68e130149809c5d49583e1ff225dd5d404d83 (patch) | |
tree | f18dc7a03335782ef17d538bea04a426e4afb893 /fs/ext2/super.c | |
parent | fba4d3997f4c3dc6de927f7f516168580033ae1a (diff) |
ext2: convert byte order of constant instead of variable
Convert byte order of constant instead of variable which can be done at
compile time (vs run time).
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 40d934c3e40..7e686732922 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -51,8 +51,7 @@ void ext2_error (struct super_block * sb, const char * function, | |||
51 | 51 | ||
52 | if (!(sb->s_flags & MS_RDONLY)) { | 52 | if (!(sb->s_flags & MS_RDONLY)) { |
53 | sbi->s_mount_state |= EXT2_ERROR_FS; | 53 | sbi->s_mount_state |= EXT2_ERROR_FS; |
54 | es->s_state = | 54 | es->s_state |= cpu_to_le16(EXT2_ERROR_FS); |
55 | cpu_to_le16(le16_to_cpu(es->s_state) | EXT2_ERROR_FS); | ||
56 | ext2_sync_super(sb, es); | 55 | ext2_sync_super(sb, es); |
57 | } | 56 | } |
58 | 57 | ||
@@ -1126,10 +1125,9 @@ void ext2_write_super (struct super_block * sb) | |||
1126 | if (!(sb->s_flags & MS_RDONLY)) { | 1125 | if (!(sb->s_flags & MS_RDONLY)) { |
1127 | es = EXT2_SB(sb)->s_es; | 1126 | es = EXT2_SB(sb)->s_es; |
1128 | 1127 | ||
1129 | if (le16_to_cpu(es->s_state) & EXT2_VALID_FS) { | 1128 | if (es->s_state & cpu_to_le16(EXT2_VALID_FS)) { |
1130 | ext2_debug ("setting valid to 0\n"); | 1129 | ext2_debug ("setting valid to 0\n"); |
1131 | es->s_state = cpu_to_le16(le16_to_cpu(es->s_state) & | 1130 | es->s_state &= cpu_to_le16(~EXT2_VALID_FS); |
1132 | ~EXT2_VALID_FS); | ||
1133 | es->s_free_blocks_count = cpu_to_le32(ext2_count_free_blocks(sb)); | 1131 | es->s_free_blocks_count = cpu_to_le32(ext2_count_free_blocks(sb)); |
1134 | es->s_free_inodes_count = cpu_to_le32(ext2_count_free_inodes(sb)); | 1132 | es->s_free_inodes_count = cpu_to_le32(ext2_count_free_inodes(sb)); |
1135 | es->s_mtime = cpu_to_le32(get_seconds()); | 1133 | es->s_mtime = cpu_to_le32(get_seconds()); |