diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-27 09:37:53 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-09-27 09:37:53 -0400 |
commit | ba39ebb61401cfe0ccd58dd0cd4da88465528c0a (patch) | |
tree | d69c14ea20c8a229cb14e7911fdc207bbd914081 /fs/ext4 | |
parent | 6d1ab10e69ff5f3cb63920ba965ec0f1f0bdaf8d (diff) |
ext4: convert to use leXX_add_cpu()
Convert cpu_to_leXX(leXX_to_cpu(E1) + E2) to use leXX_add_cpu().
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/extents.c | 2 | ||||
-rw-r--r-- | fs/ext4/move_extent.c | 5 | ||||
-rw-r--r-- | fs/ext4/super.c | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index cbcc6b3f2ae..8f08c7b7717 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -1177,7 +1177,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, | |||
1177 | le32_to_cpu(EXT_FIRST_INDEX(neh)->ei_block), | 1177 | le32_to_cpu(EXT_FIRST_INDEX(neh)->ei_block), |
1178 | ext4_idx_pblock(EXT_FIRST_INDEX(neh))); | 1178 | ext4_idx_pblock(EXT_FIRST_INDEX(neh))); |
1179 | 1179 | ||
1180 | neh->eh_depth = cpu_to_le16(le16_to_cpu(neh->eh_depth) + 1); | 1180 | le16_add_cpu(&neh->eh_depth, 1); |
1181 | ext4_mark_inode_dirty(handle, inode); | 1181 | ext4_mark_inode_dirty(handle, inode); |
1182 | out: | 1182 | out: |
1183 | brelse(bh); | 1183 | brelse(bh); |
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index cee4bd066b7..8076b96b529 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c | |||
@@ -570,9 +570,8 @@ mext_calc_swap_extents(struct ext4_extent *tmp_dext, | |||
570 | diff = donor_off - le32_to_cpu(tmp_dext->ee_block); | 570 | diff = donor_off - le32_to_cpu(tmp_dext->ee_block); |
571 | 571 | ||
572 | ext4_ext_store_pblock(tmp_dext, ext4_ext_pblock(tmp_dext) + diff); | 572 | ext4_ext_store_pblock(tmp_dext, ext4_ext_pblock(tmp_dext) + diff); |
573 | tmp_dext->ee_block = | 573 | le32_add_cpu(&tmp_dext->ee_block, diff); |
574 | cpu_to_le32(le32_to_cpu(tmp_dext->ee_block) + diff); | 574 | le16_add_cpu(&tmp_dext->ee_len, -diff); |
575 | tmp_dext->ee_len = cpu_to_le16(le16_to_cpu(tmp_dext->ee_len) - diff); | ||
576 | 575 | ||
577 | if (max_count < ext4_ext_get_actual_len(tmp_dext)) | 576 | if (max_count < ext4_ext_get_actual_len(tmp_dext)) |
578 | tmp_dext->ee_len = cpu_to_le16(max_count); | 577 | tmp_dext->ee_len = cpu_to_le16(max_count); |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index a53a23aef5e..ae456321c5b 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -431,7 +431,7 @@ static void __save_error_info(struct super_block *sb, const char *func, | |||
431 | */ | 431 | */ |
432 | if (!es->s_error_count) | 432 | if (!es->s_error_count) |
433 | mod_timer(&EXT4_SB(sb)->s_err_report, jiffies + 24*60*60*HZ); | 433 | mod_timer(&EXT4_SB(sb)->s_err_report, jiffies + 24*60*60*HZ); |
434 | es->s_error_count = cpu_to_le32(le32_to_cpu(es->s_error_count) + 1); | 434 | le32_add_cpu(&es->s_error_count, 1); |
435 | } | 435 | } |
436 | 436 | ||
437 | static void save_error_info(struct super_block *sb, const char *func, | 437 | static void save_error_info(struct super_block *sb, const char *func, |