summaryrefslogtreecommitdiff
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorZheng Liu <wenqing.lz@taobao.com>2013-02-18 00:28:04 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-02-18 00:28:04 -0500
commita25a4e1a5d5dc0f97dddbca44e695c532d8228c1 (patch)
tree4c2c484e8f0fe68835f859ff85c66b1a3a6a5497 /fs/ext4/inode.c
parentbe401363ac5ec652c706263a59b0bd0acc3612e8 (diff)
ext4: let ext4_ext_map_blocks return EXT4_MAP_UNWRITTEN flag
This commit lets ext4_ext_map_blocks return EXT4_MAP_UNWRITTEN flag because in later commit ext4_map_blocks needs to use this flag to determine the extent status. Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index e0e1cb0863f4..084b8212cf95 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -559,16 +559,10 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
return retval;
/*
- * When we call get_blocks without the create flag, the
- * BH_Unwritten flag could have gotten set if the blocks
- * requested were part of a uninitialized extent. We need to
- * clear this flag now that we are committed to convert all or
- * part of the uninitialized extent to be an initialized
- * extent. This is because we need to avoid the combination
- * of BH_Unwritten and BH_Mapped flags being simultaneously
- * set on the buffer_head.
+ * Here we clear m_flags because after allocating an new extent,
+ * it will be set again.
*/
- map->m_flags &= ~EXT4_MAP_UNWRITTEN;
+ map->m_flags &= ~EXT4_MAP_FLAGS;
/*
* New blocks allocate and/or writing to uninitialized extent