aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ee611daf0748..8a8f9f0be911 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3708,6 +3708,11 @@ long ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len)
3708 */ 3708 */
3709 credits = ext4_chunk_trans_blocks(inode, max_blocks); 3709 credits = ext4_chunk_trans_blocks(inode, max_blocks);
3710 mutex_lock(&inode->i_mutex); 3710 mutex_lock(&inode->i_mutex);
3711 ret = inode_newsize_ok(inode, (len + offset));
3712 if (ret) {
3713 mutex_unlock(&inode->i_mutex);
3714 return ret;
3715 }
3711retry: 3716retry:
3712 while (ret >= 0 && ret < max_blocks) { 3717 while (ret >= 0 && ret < max_blocks) {
3713 block = block + ret; 3718 block = block + ret;