OSDN Git Service

mm: simplify bdi refcounting
authorChristoph Hellwig <hch@lst.de>
Fri, 5 Nov 2021 20:37:04 +0000 (13:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:34 +0000 (13:30 -0700)
commitefee17134ca464639a2f5b4d036ce40caf1b247a
treeab0db78acebfe2bdbeb0cd3109523d10388f6e8e
parent702f2d1e3b33617a8d9a9424f08a69b7c51642a7
mm: simplify bdi refcounting

Move grabbing and releasing the bdi refcount out of the common
wb_init/wb_exit helpers into code that is only used for the non-default
memcg driven bdi_writeback structures.

[hch@lst.de: add comment]
Link: https://lkml.kernel.org/r/20211027074207.GA12793@lst.de
[akpm@linux-foundation.org: fix typo]

Link: https://lkml.kernel.org/r/20211021124441.668816-6-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/backing-dev-defs.h
mm/backing-dev.c