diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-02-08 07:20:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:32 -0500 |
commit | 50e8a2890ed0eeb7a11ae0c39144fcdd1cad1cf8 (patch) | |
tree | b02bee4f8cf2bc16b63596e9c6a316bb91dfb58a /fs/ext3/xattr.c | |
parent | 8b5f6883683c91ad7e1af32b7ceeb604d68e2865 (diff) |
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>
Diffstat (limited to 'fs/ext3/xattr.c')
-rw-r--r-- | fs/ext3/xattr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 408373819e34..fb89c299bece 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c | |||
@@ -492,8 +492,7 @@ ext3_xattr_release_block(handle_t *handle, struct inode *inode, | |||
492 | get_bh(bh); | 492 | get_bh(bh); |
493 | ext3_forget(handle, 1, inode, bh, bh->b_blocknr); | 493 | ext3_forget(handle, 1, inode, bh, bh->b_blocknr); |
494 | } else { | 494 | } else { |
495 | BHDR(bh)->h_refcount = cpu_to_le32( | 495 | le32_add_cpu(&BHDR(bh)->h_refcount, -1); |
496 | le32_to_cpu(BHDR(bh)->h_refcount) - 1); | ||
497 | error = ext3_journal_dirty_metadata(handle, bh); | 496 | error = ext3_journal_dirty_metadata(handle, bh); |
498 | if (IS_SYNC(inode)) | 497 | if (IS_SYNC(inode)) |
499 | handle->h_sync = 1; | 498 | handle->h_sync = 1; |
@@ -780,8 +779,7 @@ inserted: | |||
780 | if (error) | 779 | if (error) |
781 | goto cleanup_dquot; | 780 | goto cleanup_dquot; |
782 | lock_buffer(new_bh); | 781 | lock_buffer(new_bh); |
783 | BHDR(new_bh)->h_refcount = cpu_to_le32(1 + | 782 | le32_add_cpu(&BHDR(new_bh)->h_refcount, 1); |
784 | le32_to_cpu(BHDR(new_bh)->h_refcount)); | ||
785 | ea_bdebug(new_bh, "reusing; refcount now=%d", | 783 | ea_bdebug(new_bh, "reusing; refcount now=%d", |
786 | le32_to_cpu(BHDR(new_bh)->h_refcount)); | 784 | le32_to_cpu(BHDR(new_bh)->h_refcount)); |
787 | unlock_buffer(new_bh); | 785 | unlock_buffer(new_bh); |