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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 55bfcd94d1ab..89a31e8869cc 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2350,6 +2350,15 @@ static void mpage_add_bh_to_extent(struct mpage_da_data *mpd,
2350 sector_t next; 2350 sector_t next;
2351 int nrblocks = mpd->b_size >> mpd->inode->i_blkbits; 2351 int nrblocks = mpd->b_size >> mpd->inode->i_blkbits;
2352 2352
2353 /*
2354 * XXX Don't go larger than mballoc is willing to allocate
2355 * This is a stopgap solution. We eventually need to fold
2356 * mpage_da_submit_io() into this function and then call
2357 * ext4_get_blocks() multiple times in a loop
2358 */
2359 if (nrblocks >= 8*1024*1024/mpd->inode->i_sb->s_blocksize)
2360 goto flush_it;
2361
2353 /* check if thereserved journal credits might overflow */ 2362 /* check if thereserved journal credits might overflow */
2354 if (!(EXT4_I(mpd->inode)->i_flags & EXT4_EXTENTS_FL)) { 2363 if (!(EXT4_I(mpd->inode)->i_flags & EXT4_EXTENTS_FL)) {
2355 if (nrblocks >= EXT4_MAX_TRANS_DATA) { 2364 if (nrblocks >= EXT4_MAX_TRANS_DATA) {