aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 2a9ffd528dd1..d7ad0bb73cd5 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2055,7 +2055,20 @@ static int mpage_da_map_blocks(struct mpage_da_data *mpd)
2055 if ((mpd->b_state & (1 << BH_Mapped)) && 2055 if ((mpd->b_state & (1 << BH_Mapped)) &&
2056 !(mpd->b_state & (1 << BH_Delay))) 2056 !(mpd->b_state & (1 << BH_Delay)))
2057 return 0; 2057 return 0;
2058 new.b_state = mpd->b_state; 2058 /*
2059 * We need to make sure the BH_Delay flag is passed down to
2060 * ext4_da_get_block_write(), since it calls
2061 * ext4_get_blocks_wrap() with the EXT4_DELALLOC_RSVED flag.
2062 * This flag causes ext4_get_blocks_wrap() to call
2063 * ext4_da_update_reserve_space() if the passed buffer head
2064 * has the BH_Delay flag set. In the future, once we clean up
2065 * the interfaces to ext4_get_blocks_wrap(), we should pass in
2066 * a separate flag which requests that the delayed allocation
2067 * statistics should be updated, instead of depending on the
2068 * state information getting passed down via the map_bh's
2069 * state bitmasks plus the magic EXT4_DELALLOC_RSVED flag.
2070 */
2071 new.b_state = mpd->b_state & (1 << BH_Delay);
2059 new.b_blocknr = 0; 2072 new.b_blocknr = 0;
2060 new.b_size = mpd->b_size; 2073 new.b_size = mpd->b_size;
2061 next = mpd->b_blocknr; 2074 next = mpd->b_blocknr;