diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2013-04-19 14:04:12 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-04-19 14:04:12 -0400 |
commit | 2656497b26d45c1ca51a7727ab92c8307cb99305 (patch) | |
tree | 3ca5df6ee834234d577d16409964ea283d4cb8b9 | |
parent | eb9cc7e16b32c898a1d715733c590f115aa0a099 (diff) |
ext4: mext_insert_extents should update extent block checksum
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | fs/ext4/ext4_extents.h | 5 | ||||
-rw-r--r-- | fs/ext4/extents.c | 7 | ||||
-rw-r--r-- | fs/ext4/move_extent.c | 13 |
3 files changed, 8 insertions, 17 deletions
diff --git a/fs/ext4/ext4_extents.h b/fs/ext4/ext4_extents.h index 8643ff5bbeb7..51bc821ade90 100644 --- a/fs/ext4/ext4_extents.h +++ b/fs/ext4/ext4_extents.h | |||
@@ -270,5 +270,10 @@ static inline void ext4_idx_store_pblock(struct ext4_extent_idx *ix, | |||
270 | 0xffff); | 270 | 0xffff); |
271 | } | 271 | } |
272 | 272 | ||
273 | #define ext4_ext_dirty(handle, inode, path) \ | ||
274 | __ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path)) | ||
275 | int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle, | ||
276 | struct inode *inode, struct ext4_ext_path *path); | ||
277 | |||
273 | #endif /* _EXT4_EXTENTS */ | 278 | #endif /* _EXT4_EXTENTS */ |
274 | 279 | ||
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 6fcb375c8fde..107936db244e 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -157,11 +157,8 @@ static int ext4_ext_get_access(handle_t *handle, struct inode *inode, | |||
157 | * - ENOMEM | 157 | * - ENOMEM |
158 | * - EIO | 158 | * - EIO |
159 | */ | 159 | */ |
160 | #define ext4_ext_dirty(handle, inode, path) \ | 160 | int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle, |
161 | __ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path)) | 161 | struct inode *inode, struct ext4_ext_path *path) |
162 | static int __ext4_ext_dirty(const char *where, unsigned int line, | ||
163 | handle_t *handle, struct inode *inode, | ||
164 | struct ext4_ext_path *path) | ||
165 | { | 162 | { |
166 | int err; | 163 | int err; |
167 | if (path->p_bh) { | 164 | if (path->p_bh) { |
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 309ca899a731..3dcbf364022f 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c | |||
@@ -409,18 +409,7 @@ mext_insert_extents(handle_t *handle, struct inode *orig_inode, | |||
409 | mext_insert_inside_block(o_start, o_end, start_ext, new_ext, | 409 | mext_insert_inside_block(o_start, o_end, start_ext, new_ext, |
410 | end_ext, eh, range_to_move); | 410 | end_ext, eh, range_to_move); |
411 | 411 | ||
412 | if (depth) { | 412 | return ext4_ext_dirty(handle, orig_inode, orig_path); |
413 | ret = ext4_handle_dirty_metadata(handle, orig_inode, | ||
414 | orig_path->p_bh); | ||
415 | if (ret) | ||
416 | return ret; | ||
417 | } else { | ||
418 | ret = ext4_mark_inode_dirty(handle, orig_inode); | ||
419 | if (ret < 0) | ||
420 | return ret; | ||
421 | } | ||
422 | |||
423 | return 0; | ||
424 | } | 413 | } |
425 | 414 | ||
426 | /** | 415 | /** |