diff options
Diffstat (limited to 'fs/omfs/file.c')
-rw-r--r-- | fs/omfs/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/omfs/file.c b/fs/omfs/file.c index 2c6d95257a4d..77e3cb2962b4 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c | |||
@@ -146,8 +146,7 @@ static int omfs_grow_extent(struct inode *inode, struct omfs_extent *oe, | |||
146 | be64_to_cpu(entry->e_blocks); | 146 | be64_to_cpu(entry->e_blocks); |
147 | 147 | ||
148 | if (omfs_allocate_block(inode->i_sb, new_block)) { | 148 | if (omfs_allocate_block(inode->i_sb, new_block)) { |
149 | entry->e_blocks = | 149 | be64_add_cpu(&entry->e_blocks, 1); |
150 | cpu_to_be64(be64_to_cpu(entry->e_blocks) + 1); | ||
151 | terminator->e_blocks = ~(cpu_to_be64( | 150 | terminator->e_blocks = ~(cpu_to_be64( |
152 | be64_to_cpu(~terminator->e_blocks) + 1)); | 151 | be64_to_cpu(~terminator->e_blocks) + 1)); |
153 | goto out; | 152 | goto out; |
@@ -177,7 +176,7 @@ static int omfs_grow_extent(struct inode *inode, struct omfs_extent *oe, | |||
177 | be64_to_cpu(~terminator->e_blocks) + (u64) new_count)); | 176 | be64_to_cpu(~terminator->e_blocks) + (u64) new_count)); |
178 | 177 | ||
179 | /* write in new entry */ | 178 | /* write in new entry */ |
180 | oe->e_extent_count = cpu_to_be32(1 + be32_to_cpu(oe->e_extent_count)); | 179 | be32_add_cpu(&oe->e_extent_count, 1); |
181 | 180 | ||
182 | out: | 181 | out: |
183 | *ret_block = new_block; | 182 | *ret_block = new_block; |