diff options
Diffstat (limited to 'fs/ext4/xattr.c')
-rw-r--r-- | fs/ext4/xattr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index e9054c1c7d93..726716b618d8 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -484,8 +484,7 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode, | |||
484 | get_bh(bh); | 484 | get_bh(bh); |
485 | ext4_forget(handle, 1, inode, bh, bh->b_blocknr); | 485 | ext4_forget(handle, 1, inode, bh, bh->b_blocknr); |
486 | } else { | 486 | } else { |
487 | BHDR(bh)->h_refcount = cpu_to_le32( | 487 | le32_add_cpu(&BHDR(bh)->h_refcount, -1); |
488 | le32_to_cpu(BHDR(bh)->h_refcount) - 1); | ||
489 | error = ext4_journal_dirty_metadata(handle, bh); | 488 | error = ext4_journal_dirty_metadata(handle, bh); |
490 | if (IS_SYNC(inode)) | 489 | if (IS_SYNC(inode)) |
491 | handle->h_sync = 1; | 490 | handle->h_sync = 1; |
@@ -789,8 +788,7 @@ inserted: | |||
789 | if (error) | 788 | if (error) |
790 | goto cleanup_dquot; | 789 | goto cleanup_dquot; |
791 | lock_buffer(new_bh); | 790 | lock_buffer(new_bh); |
792 | BHDR(new_bh)->h_refcount = cpu_to_le32(1 + | 791 | le32_add_cpu(&BHDR(new_bh)->h_refcount, 1); |
793 | le32_to_cpu(BHDR(new_bh)->h_refcount)); | ||
794 | ea_bdebug(new_bh, "reusing; refcount now=%d", | 792 | ea_bdebug(new_bh, "reusing; refcount now=%d", |
795 | le32_to_cpu(BHDR(new_bh)->h_refcount)); | 793 | le32_to_cpu(BHDR(new_bh)->h_refcount)); |
796 | unlock_buffer(new_bh); | 794 | unlock_buffer(new_bh); |