|
@@ -146,8 +146,7 @@ static int omfs_grow_extent(struct inode *inode, struct omfs_extent *oe,
|
|
be64_to_cpu(entry->e_blocks);
|
|
be64_to_cpu(entry->e_blocks);
|
|
|
|
|
|
if (omfs_allocate_block(inode->i_sb, new_block)) {
|
|
if (omfs_allocate_block(inode->i_sb, new_block)) {
|
|
- entry->e_blocks =
|
|
|
|
- cpu_to_be64(be64_to_cpu(entry->e_blocks) + 1);
|
|
|
|
|
|
+ be64_add_cpu(&entry->e_blocks, 1);
|
|
terminator->e_blocks = ~(cpu_to_be64(
|
|
terminator->e_blocks = ~(cpu_to_be64(
|
|
be64_to_cpu(~terminator->e_blocks) + 1));
|
|
be64_to_cpu(~terminator->e_blocks) + 1));
|
|
goto out;
|
|
goto out;
|
|
@@ -177,7 +176,7 @@ static int omfs_grow_extent(struct inode *inode, struct omfs_extent *oe,
|
|
be64_to_cpu(~terminator->e_blocks) + (u64) new_count));
|
|
be64_to_cpu(~terminator->e_blocks) + (u64) new_count));
|
|
|
|
|
|
/* write in new entry */
|
|
/* write in new entry */
|
|
- oe->e_extent_count = cpu_to_be32(1 + be32_to_cpu(oe->e_extent_count));
|
|
|
|
|
|
+ be32_add_cpu(&oe->e_extent_count, 1);
|
|
|
|
|
|
out:
|
|
out:
|
|
*ret_block = new_block;
|
|
*ret_block = new_block;
|