aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 3ea827ddf0fe..04b53b5ebe59 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4806,8 +4806,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
4806 * and the replacement file is large. Start IO on it now so 4806 * and the replacement file is large. Start IO on it now so
4807 * we don't add too much work to the end of the transaction 4807 * we don't add too much work to the end of the transaction
4808 */ 4808 */
4809 if (new_inode && old_inode && S_ISREG(old_inode->i_mode) && 4809 if (new_inode && S_ISREG(old_inode->i_mode) && new_inode->i_size &&
4810 new_inode->i_size &&
4811 old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT) 4810 old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT)
4812 filemap_flush(old_inode->i_mapping); 4811 filemap_flush(old_inode->i_mapping);
4813 4812