diff options
author | Josef Bacik <josef@redhat.com> | 2010-06-07 20:26:37 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-06-11 17:46:12 +0200 |
commit | 836097797236fd727f82ec2f3f376ac41a430876 (patch) | |
tree | 72481501a21cfa6494e0b9bba89e3a8f783e2074 | |
parent | Btrfs: fix loop device on top of btrfs (diff) | |
download | linux-836097797236fd727f82ec2f3f376ac41a430876.tar.xz linux-836097797236fd727f82ec2f3f376ac41a430876.zip |
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 <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2551b8018399..d999c538cdc2 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, |