From: Andrew Morton Date: Tue, 26 Oct 2010 21:22:05 +0000 (-0700) Subject: fs/fs-writeback.c: restore lost comment X-Git-Tag: v2.6.37-rc1~105^2~110 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=74ce002d9aee23031b4967e1dd1c1966ddc60749;p=cascardo%2Flinux.git fs/fs-writeback.c: restore lost comment I had to go back to a 2.6.20 tree to work out why we're adding a number-of-inodes into a number-of-pages count. Restore the lost comment. Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 97d2951bd4d1..b5aae4bd0aca 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -721,6 +721,10 @@ static long wb_check_old_data_flush(struct bdi_writeback *wb) return 0; wb->last_old_flush = jiffies; + /* + * Add in the number of potentially dirty inodes, because each inode + * write can dirty pagecache in the underlying blockdev. + */ nr_pages = global_page_state(NR_FILE_DIRTY) + global_page_state(NR_UNSTABLE_NFS) + (inodes_stat.nr_inodes - inodes_stat.nr_unused);