Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1448b926 authored by Jan Kara's avatar Jan Kara Committed by Gerrit - the friendly Code Review server
Browse files

bdi: Mark congested->bdi as internal



congested->bdi pointer is used only to be able to remove congested
structure from bdi->cgwb_congested_tree on structure release. Moreover
the pointer can become NULL when we unregister the bdi. Rename the field
to __bdi and add a comment to make it more explicit this is internal
stuff of memcg writeback code and people should not use the field as
such use will be likely race prone.

We do not bother with converting congested->bdi to a proper refcounted
reference. It will be slightly ugly to special-case bdi->wb.congested to
avoid effectively a cyclic reference of bdi to itself and the reference
gets cleared from bdi_unregister() making it impossible to reference
a freed bdi.

Change-Id: I12635b4aad9b5689390c2c7c345957cad17bb7a2
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Git-commit: b7d680d7bf584bce6023343304b819009a7c3336
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git


Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent 9179eba0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment