Commit 0dd3256e authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Mark Fasheh

[PATCH] ocfs2: 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: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
parent 1044e401
...@@ -390,8 +390,7 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir, ...@@ -390,8 +390,7 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir,
goto bail; goto bail;
} }
if (pde) if (pde)
pde->rec_len = le16_add_cpu(&pde->rec_len,
cpu_to_le16(le16_to_cpu(pde->rec_len) +
le16_to_cpu(de->rec_len)); le16_to_cpu(de->rec_len));
else else
de->inode = 0; de->inode = 0;
......
...@@ -585,8 +585,7 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, ...@@ -585,8 +585,7 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
while(bits_wanted--) while(bits_wanted--)
ocfs2_set_bit(start++, bitmap); ocfs2_set_bit(start++, bitmap);
alloc->id1.bitmap1.i_used = cpu_to_le32(*num_bits + le32_add_cpu(&alloc->id1.bitmap1.i_used, *num_bits);
le32_to_cpu(alloc->id1.bitmap1.i_used));
status = ocfs2_journal_dirty(handle, osb->local_alloc_bh); status = ocfs2_journal_dirty(handle, osb->local_alloc_bh);
if (status < 0) { if (status < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment