Commit 2656497b authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Theodore Ts'o

ext4: mext_insert_extents should update extent block checksum

Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent eb9cc7e1
...@@ -270,5 +270,10 @@ static inline void ext4_idx_store_pblock(struct ext4_extent_idx *ix, ...@@ -270,5 +270,10 @@ static inline void ext4_idx_store_pblock(struct ext4_extent_idx *ix,
0xffff); 0xffff);
} }
#define ext4_ext_dirty(handle, inode, path) \
__ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path))
int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle,
struct inode *inode, struct ext4_ext_path *path);
#endif /* _EXT4_EXTENTS */ #endif /* _EXT4_EXTENTS */
...@@ -157,11 +157,8 @@ static int ext4_ext_get_access(handle_t *handle, struct inode *inode, ...@@ -157,11 +157,8 @@ static int ext4_ext_get_access(handle_t *handle, struct inode *inode,
* - ENOMEM * - ENOMEM
* - EIO * - EIO
*/ */
#define ext4_ext_dirty(handle, inode, path) \ int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle,
__ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path)) struct inode *inode, struct ext4_ext_path *path)
static int __ext4_ext_dirty(const char *where, unsigned int line,
handle_t *handle, struct inode *inode,
struct ext4_ext_path *path)
{ {
int err; int err;
if (path->p_bh) { if (path->p_bh) {
......
...@@ -409,18 +409,7 @@ mext_insert_extents(handle_t *handle, struct inode *orig_inode, ...@@ -409,18 +409,7 @@ mext_insert_extents(handle_t *handle, struct inode *orig_inode,
mext_insert_inside_block(o_start, o_end, start_ext, new_ext, mext_insert_inside_block(o_start, o_end, start_ext, new_ext,
end_ext, eh, range_to_move); end_ext, eh, range_to_move);
if (depth) { return ext4_ext_dirty(handle, orig_inode, orig_path);
ret = ext4_handle_dirty_metadata(handle, orig_inode,
orig_path->p_bh);
if (ret)
return ret;
} else {
ret = ext4_mark_inode_dirty(handle, orig_inode);
if (ret < 0)
return ret;
}
return 0;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment