ext4: le*_add_cpu conversion
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); generated with semantic patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: linux-ext4@vger.kernel.org Cc: sct@redhat.com Cc: Andrew Morton <akpm@linux-foundation.org> Cc: adilger@clusterfs.com Cc: Mingming Cao <cmm@us.ibm.com>
This commit is contained in:
committed by
Theodore Ts'o
parent
9a0762c5af
commit
e8546d0615
@@ -484,8 +484,7 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode,
|
||||
get_bh(bh);
|
||||
ext4_forget(handle, 1, inode, bh, bh->b_blocknr);
|
||||
} else {
|
||||
BHDR(bh)->h_refcount = cpu_to_le32(
|
||||
le32_to_cpu(BHDR(bh)->h_refcount) - 1);
|
||||
le32_add_cpu(&BHDR(bh)->h_refcount, -1);
|
||||
error = ext4_journal_dirty_metadata(handle, bh);
|
||||
if (IS_SYNC(inode))
|
||||
handle->h_sync = 1;
|
||||
@@ -789,8 +788,7 @@ inserted:
|
||||
if (error)
|
||||
goto cleanup_dquot;
|
||||
lock_buffer(new_bh);
|
||||
BHDR(new_bh)->h_refcount = cpu_to_le32(1 +
|
||||
le32_to_cpu(BHDR(new_bh)->h_refcount));
|
||||
le32_add_cpu(&BHDR(new_bh)->h_refcount, 1);
|
||||
ea_bdebug(new_bh, "reusing; refcount now=%d",
|
||||
le32_to_cpu(BHDR(new_bh)->h_refcount));
|
||||
unlock_buffer(new_bh);
|
||||
|
Reference in New Issue
Block a user