Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

writeback: explain why @inode is allowed to be NULL for inode_congested()

Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>

authored by

Tejun Heo and committed by
Jens Axboe
60292bcc 8a1270cd

+4 -1
+4 -1
fs/fs-writeback.c
··· 701 701 702 702 /** 703 703 * inode_congested - test whether an inode is congested 704 - * @inode: inode to test for congestion 704 + * @inode: inode to test for congestion (may be NULL) 705 705 * @cong_bits: mask of WB_[a]sync_congested bits to test 706 706 * 707 707 * Tests whether @inode is congested. @cong_bits is the mask of congestion ··· 711 711 * determined by whether the cgwb (cgroup bdi_writeback) for the blkcg 712 712 * associated with @inode is congested; otherwise, the root wb's congestion 713 713 * state is used. 714 + * 715 + * @inode is allowed to be NULL as this function is often called on 716 + * mapping->host which is NULL for the swapper space. 714 717 */ 715 718 int inode_congested(struct inode *inode, int cong_bits) 716 719 {