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>

authored by Aneesh Kumar K.V and committed by Chris Mason 23b5c509 efd049fb

+3 -1
+3 -1
fs/btrfs/inode.c
··· 5799 5799 inode->i_ctime = CURRENT_TIME; 5800 5800 BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC; 5801 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 5805 if (cur_offset > actual_len) 5804 5806 i_size = actual_len; 5805 5807 else