diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-02-04 11:33:03 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-02-04 11:33:03 -0500 |
commit | 23b5c50945f2294add0137799400329c0ebba290 (patch) | |
tree | b7bb2ea17bc2244162adef8a288db12cacbf3524 /fs/btrfs | |
parent | efd049fb26a162c3830fd3cb1001fdc09b147f3b (diff) |
Btrfs: apply updated fallocate i_size fix
This version of the i_size fix for fallocate makes sure we only update
the i_size when the current fallocate is really operating outside of
i_size.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 6782aa19130d..4deb280f8969 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -5799,7 +5799,9 @@ static int prealloc_file_range(struct inode *inode, u64 start, u64 end, | |||
5799 | inode->i_ctime = CURRENT_TIME; | 5799 | inode->i_ctime = CURRENT_TIME; |
5800 | BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC; | 5800 | BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC; |
5801 | if (!(mode & FALLOC_FL_KEEP_SIZE) && | 5801 | if (!(mode & FALLOC_FL_KEEP_SIZE) && |
5802 | cur_offset > inode->i_size) { | 5802 | (actual_len > inode->i_size) && |
5803 | (cur_offset > inode->i_size)) { | ||
5804 | |||
5803 | if (cur_offset > actual_len) | 5805 | if (cur_offset > actual_len) |
5804 | i_size = actual_len; | 5806 | i_size = actual_len; |
5805 | else | 5807 | else |