Skip to content

Commit 29de844

Browse files
LiBaokun96gregkh
authored andcommitted
writeback: drop now-unnecessary rcu_barrier() in cgroup_writeback_umount()
[ Upstream commit e90a6d6 ] Commit e1b849c ("writeback: Avoid contention on wb->list_lock when switching inodes") replaced the queue_rcu_work() based scheduling of inode wb switches with a plain queue_work(). Since then no switcher goes through call_rcu(), so rcu_barrier() in cgroup_writeback_umount() has no callbacks of its own to wait for. It still drains unrelated call_rcu() callbacks from other subsystems on busy systems, which incidentally slows umount down; drop it. Fixes: e1b849c ("writeback: Avoid contention on wb->list_lock when switching inodes") Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Baokun Li <libaokun@linux.alibaba.com> Link: https://patch.msgid.link/20260521095016.2791354-3-libaokun@linux.alibaba.com Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2469039 commit 29de844

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

fs/fs-writeback.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,11 +1237,6 @@ void cgroup_writeback_umount(struct super_block *sb)
12371237
* will then drain it.
12381238
*/
12391239
synchronize_rcu();
1240-
/*
1241-
* Use rcu_barrier() to wait for all pending callbacks to
1242-
* ensure that all in-flight wb switches are in the workqueue.
1243-
*/
1244-
rcu_barrier();
12451240
flush_workqueue(isw_wq);
12461241
}
12471242
}

0 commit comments

Comments
 (0)