From: Josef Bacik Date: Mon, 7 Jun 2010 18:26:37 +0000 (+0000) Subject: Btrfs: fix fallocate regression X-Git-Tag: v2.6.35-rc3~3^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=836097797236fd727f82ec2f3f376ac41a430876;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git Btrfs: fix fallocate regression Seems that when btrfs_fallocate was converted to use the new ENOSPC stuff we dropped passing the mode to the function that actually does the preallocation. This breaks anybody who wants to use FALLOC_FL_KEEP_SIZE. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2551b80..d999c53 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6893,7 +6893,7 @@ static long btrfs_fallocate(struct inode *inode, int mode, if (em->block_start == EXTENT_MAP_HOLE || (cur_offset >= inode->i_size && !test_bit(EXTENT_FLAG_PREALLOC, &em->flags))) { - ret = btrfs_prealloc_file_range(inode, 0, cur_offset, + ret = btrfs_prealloc_file_range(inode, mode, cur_offset, last_byte - cur_offset, 1 << inode->i_blkbits, offset + len,