]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
btrfs: don't balance btree inode pages from buffered write path
authorNikolay Borisov <nborisov@suse.com>
Thu, 28 May 2020 08:05:13 +0000 (11:05 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:20 +0000 (12:55 +0200)
The call to btrfs_btree_balance_dirty has been there since the early
days of BTRFS, when the btree was directly modified from the write path,
hence dirtied btree inode pages. With the implementation of b888db2bd7b6
("Btrfs: Add delayed allocation to the extent based page tree code")
13 years ago the btree is no longer modified from the write path, hence
there is no point in calling this function. Just remove it.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c

index b0d2c976587e523c070a6d41df05fefeeead226b..52422e2b3344095c0a0bc29d1e51430e47d37d56 100644 (file)
@@ -1800,8 +1800,6 @@ again:
                cond_resched();
 
                balance_dirty_pages_ratelimited(inode->i_mapping);
-               if (dirty_pages < (fs_info->nodesize >> PAGE_SHIFT) + 1)
-                       btrfs_btree_balance_dirty(fs_info);
 
                pos += copied;
                num_written += copied;