summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJulian Sun <sunjunchao@bytedance.com>2026-10-16 19:52:30 +0800
committerChristian Brauner <brauner@kernel.org>2026-10-21 12:19:14 +0200
commita396fe9f74ea367ae3fab2dcb70b24e83db9f0cb (patch)
tree15a2e5e66657e2e1bc074a6283a3dbe4377814a6 /include/linux
parent13b9a606dd0a6cf9bac12894c97b9546d22a7425 (diff)
downloadlinux-a396fe9f74ea367ae3fab2dcb70b24e83db9f0cb.tar.gz
linux-a396fe9f74ea367ae3fab2dcb70b24e83db9f0cb.zip
writeback: clear old wb dirty state after inode switches
Switching an inode to another wb updates the target wb's dirty-I/O state, but no longer checks whether the source wb's dirty-I/O lists became empty. The check was lost when inode_io_list_del_locked(inode, old_wb) was removed to support tracking clean attached inodes. If the last dirty inode is moved, WB_has_dirty_io remains set on the old wb and its bandwidth contribution remains in bdi->tot_write_bandwidth. This can keep an empty wb scheduled for periodic writeback and overstate the total bandwidth used to distribute writeback work. Call wb_io_lists_depopulated() on the old wb after the batch of inode switches, while its list_lock is still held. This clears the flag and removes the bandwidth contribution if its dirty-I/O lists are empty. Fixes: f3b6a6df38aa ("writeback, cgroup: keep list of inodes attached to bdi_writeback") Cc: stable@vger.kernel.org Signed-off-by: Julian Sun <sunjunchao@bytedance.com> Link: https://patch.msgid.link/20261016115230.3640770-3-sunjunchao@bytedance.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions