|
@@ -595,14 +595,6 @@ found:
|
|
|
*/
|
|
|
down_write(&EXT4_I(inode)->i_data_sem);
|
|
|
|
|
|
- /*
|
|
|
- * if the caller is from delayed allocation writeout path
|
|
|
- * we have already reserved fs blocks for allocation
|
|
|
- * let the underlying get_block() function know to
|
|
|
- * avoid double accounting
|
|
|
- */
|
|
|
- if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE)
|
|
|
- ext4_set_inode_state(inode, EXT4_STATE_DELALLOC_RESERVED);
|
|
|
/*
|
|
|
* We need to check for EXT4 here because migrate
|
|
|
* could have changed the inode type in between
|
|
@@ -631,8 +623,6 @@ found:
|
|
|
(flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE))
|
|
|
ext4_da_update_reserve_space(inode, retval, 1);
|
|
|
}
|
|
|
- if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE)
|
|
|
- ext4_clear_inode_state(inode, EXT4_STATE_DELALLOC_RESERVED);
|
|
|
|
|
|
if (retval > 0) {
|
|
|
unsigned int status;
|
|
@@ -2004,12 +1994,10 @@ static int mpage_map_one_extent(handle_t *handle, struct mpage_da_data *mpd)
|
|
|
* in data loss. So use reserved blocks to allocate metadata if
|
|
|
* possible.
|
|
|
*
|
|
|
- * We pass in the magic EXT4_GET_BLOCKS_DELALLOC_RESERVE if the blocks
|
|
|
- * in question are delalloc blocks. This affects functions in many
|
|
|
- * different parts of the allocation call path. This flag exists
|
|
|
- * primarily because we don't want to change *many* call functions, so
|
|
|
- * ext4_map_blocks() will set the EXT4_STATE_DELALLOC_RESERVED flag
|
|
|
- * once the inode's allocation semaphore is taken.
|
|
|
+ * We pass in the magic EXT4_GET_BLOCKS_DELALLOC_RESERVE if
|
|
|
+ * the blocks in question are delalloc blocks. This indicates
|
|
|
+ * that the blocks and quotas has already been checked when
|
|
|
+ * the data was copied into the page cache.
|
|
|
*/
|
|
|
get_blocks_flags = EXT4_GET_BLOCKS_CREATE |
|
|
|
EXT4_GET_BLOCKS_METADATA_NOFAIL;
|