staging: lustre: fix unstable pages tracking
authorArnd Bergmann <arnd@arndb.de>
Mon, 29 Aug 2016 12:20:00 +0000 (14:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:29:21 +0000 (17:29 +0200)
commit7894c263f200aea33b0be3f8408adc93e3129f0f
treed8de87b92d036bc48b5a0f94f12326ca928d16fb
parentbbc2d82f1cc931f4287c716000ded8c4613249f2
staging: lustre: fix unstable pages tracking

A patch to change to page accounting code (in v4.8-rc1) conflicts with
a change to lustre (in staging-next for v4.9), and fortunately gets
detected using a gcc warning:

In file included from /git/arm-soc/include/linux/mm.h:1001:0,
                 from /git/arm-soc/include/linux/highmem.h:7,
                 from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/linux/libcfs.h:46,
                 from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/libcfs.h:36,
                 from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_cl_internal.h:45,
                 from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_page.c:40:
drivers/staging/lustre/lustre/osc/osc_page.c: In function 'unstable_page_accounting':
include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds]
  atomic_long_add(x, &vm_zone_stat[item]);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds]
  atomic_long_add(x, &vm_zone_stat[item]);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This changes the function to use the correct interface for accounting in the
"node" rather than the "zone".

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d806f30e639b ("staging: lustre: osc: revise unstable pages accounting")
Fixes: 11fb998986a7 ("mm: move most file-based accounting to the node")
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_page.c
This page took 0.027052 seconds and 5 git commands to generate.