ext3: replace all adds to little endians variables with le*_add_cpu
replace all: little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) + expression_in_cpu_byteorder); with: leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder); sparse didn't generate any new warning with this patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: David Chinner <dgc@sgi.com> Cc: Timothy Shimmin <tes@sgi.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>
This commit is contained in:
committed by
Linus Torvalds
parent
8b5f688368
commit
50e8a2890e
@@ -164,11 +164,9 @@ void ext3_free_inode (handle_t *handle, struct inode * inode)
|
||||
|
||||
if (gdp) {
|
||||
spin_lock(sb_bgl_lock(sbi, block_group));
|
||||
gdp->bg_free_inodes_count = cpu_to_le16(
|
||||
le16_to_cpu(gdp->bg_free_inodes_count) + 1);
|
||||
le16_add_cpu(&gdp->bg_free_inodes_count, 1);
|
||||
if (is_directory)
|
||||
gdp->bg_used_dirs_count = cpu_to_le16(
|
||||
le16_to_cpu(gdp->bg_used_dirs_count) - 1);
|
||||
le16_add_cpu(&gdp->bg_used_dirs_count, -1);
|
||||
spin_unlock(sb_bgl_lock(sbi, block_group));
|
||||
percpu_counter_inc(&sbi->s_freeinodes_counter);
|
||||
if (is_directory)
|
||||
@@ -527,11 +525,9 @@ got:
|
||||
err = ext3_journal_get_write_access(handle, bh2);
|
||||
if (err) goto fail;
|
||||
spin_lock(sb_bgl_lock(sbi, group));
|
||||
gdp->bg_free_inodes_count =
|
||||
cpu_to_le16(le16_to_cpu(gdp->bg_free_inodes_count) - 1);
|
||||
le16_add_cpu(&gdp->bg_free_inodes_count, -1);
|
||||
if (S_ISDIR(mode)) {
|
||||
gdp->bg_used_dirs_count =
|
||||
cpu_to_le16(le16_to_cpu(gdp->bg_used_dirs_count) + 1);
|
||||
le16_add_cpu(&gdp->bg_used_dirs_count, 1);
|
||||
}
|
||||
spin_unlock(sb_bgl_lock(sbi, group));
|
||||
BUFFER_TRACE(bh2, "call ext3_journal_dirty_metadata");
|
||||
|
Reference in New Issue
Block a user