Yang Shi 50e55bf626 mm/page-writeback.c: initialize m_dirty to avoid compile warning
When building kernel with gcc 5.2, the below warning is raised:

  mm/page-writeback.c: In function 'balance_dirty_pages.isra.10':
  mm/page-writeback.c:1545:17: warning: 'm_dirty' may be used uninitialized in this function [-Wmaybe-uninitialized]
     unsigned long m_dirty, m_thresh, m_bg_thresh;

The m_dirty{thresh, bg_thresh} are initialized in the block of "if
(mdtc)", so if mdts is null, they won't be initialized before being used.
Initialize m_dirty to zero, also initialize m_thresh and m_bg_thresh to
keep consistency.

They are used later by if condition: !mdtc || m_dirty <=
dirty_freerun_ceiling(m_thresh, m_bg_thresh)

If mdtc is null, dirty_freerun_ceiling will not be called at all, so the
initialization will not change any behavior other than just ceasing the
compile warning.

(akpm: the patch actually reduces .text size by ~20 bytes on gcc-4.x.y)

[akpm@linux-foundation.org: add comment]
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
..
2015-11-05 19:34:48 -08:00
2015-11-06 17:50:42 -08:00
2015-06-24 17:49:45 -07:00
2015-11-05 19:34:48 -08:00
2015-11-10 16:32:11 -08:00
2015-11-06 17:50:42 -08:00
2015-09-11 16:42:39 -07:00
2015-10-16 11:42:28 -07:00
2015-09-08 15:35:28 -07:00
2015-11-05 19:34:48 -08:00
2015-11-05 19:34:48 -08:00
2015-02-11 17:06:02 -08:00
2015-11-05 19:34:48 -08:00
2015-11-05 19:34:48 -08:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-11-05 19:34:48 -08:00
2015-11-06 17:50:42 -08:00
2015-11-05 19:34:48 -08:00