diff options
Diffstat (limited to 'fs/ext2/xattr.c')
-rw-r--r-- | fs/ext2/xattr.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index a99d46f3b26e..b86f02747eaf 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c | |||
@@ -646,8 +646,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
646 | unlock_buffer(new_bh); | 646 | unlock_buffer(new_bh); |
647 | goto cleanup; | 647 | goto cleanup; |
648 | } | 648 | } |
649 | HDR(new_bh)->h_refcount = cpu_to_le32(1 + | 649 | le32_add_cpu(&HDR(new_bh)->h_refcount, 1); |
650 | le32_to_cpu(HDR(new_bh)->h_refcount)); | ||
651 | ea_bdebug(new_bh, "refcount now=%d", | 650 | ea_bdebug(new_bh, "refcount now=%d", |
652 | le32_to_cpu(HDR(new_bh)->h_refcount)); | 651 | le32_to_cpu(HDR(new_bh)->h_refcount)); |
653 | } | 652 | } |
@@ -731,8 +730,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
731 | bforget(old_bh); | 730 | bforget(old_bh); |
732 | } else { | 731 | } else { |
733 | /* Decrement the refcount only. */ | 732 | /* Decrement the refcount only. */ |
734 | HDR(old_bh)->h_refcount = cpu_to_le32( | 733 | le32_add_cpu(&HDR(old_bh)->h_refcount, -1); |
735 | le32_to_cpu(HDR(old_bh)->h_refcount) - 1); | ||
736 | if (ce) | 734 | if (ce) |
737 | mb_cache_entry_release(ce); | 735 | mb_cache_entry_release(ce); |
738 | DQUOT_FREE_BLOCK(inode, 1); | 736 | DQUOT_FREE_BLOCK(inode, 1); |
@@ -789,8 +787,7 @@ ext2_xattr_delete_inode(struct inode *inode) | |||
789 | bforget(bh); | 787 | bforget(bh); |
790 | unlock_buffer(bh); | 788 | unlock_buffer(bh); |
791 | } else { | 789 | } else { |
792 | HDR(bh)->h_refcount = cpu_to_le32( | 790 | le32_add_cpu(&HDR(bh)->h_refcount, -1); |
793 | le32_to_cpu(HDR(bh)->h_refcount) - 1); | ||
794 | if (ce) | 791 | if (ce) |
795 | mb_cache_entry_release(ce); | 792 | mb_cache_entry_release(ce); |
796 | ea_bdebug(bh, "refcount now=%d", | 793 | ea_bdebug(bh, "refcount now=%d", |