|
@@ -252,7 +252,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
|
|
|
fatal = ext4_journal_get_write_access(handle, bh2);
|
|
fatal = ext4_journal_get_write_access(handle, bh2);
|
|
|
}
|
|
}
|
|
|
ext4_lock_group(sb, block_group);
|
|
ext4_lock_group(sb, block_group);
|
|
|
- cleared = ext4_clear_bit(bit, bitmap_bh->b_data);
|
|
|
|
|
|
|
+ cleared = ext4_test_and_clear_bit(bit, bitmap_bh->b_data);
|
|
|
if (fatal || !cleared) {
|
|
if (fatal || !cleared) {
|
|
|
ext4_unlock_group(sb, block_group);
|
|
ext4_unlock_group(sb, block_group);
|
|
|
goto out;
|
|
goto out;
|
|
@@ -618,7 +618,7 @@ static int ext4_claim_inode(struct super_block *sb,
|
|
|
*/
|
|
*/
|
|
|
down_read(&grp->alloc_sem);
|
|
down_read(&grp->alloc_sem);
|
|
|
ext4_lock_group(sb, group);
|
|
ext4_lock_group(sb, group);
|
|
|
- if (ext4_set_bit(ino, inode_bitmap_bh->b_data)) {
|
|
|
|
|
|
|
+ if (ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data)) {
|
|
|
/* not a free inode */
|
|
/* not a free inode */
|
|
|
retval = 1;
|
|
retval = 1;
|
|
|
goto err_ret;
|
|
goto err_ret;
|