staging: lustre: libcfs: remove page_index() macro
authorJames Simmons <jsimmons@infradead.org>
Thu, 31 Mar 2016 14:18:37 +0000 (10:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Mar 2016 20:04:45 +0000 (13:04 -0700)
Just use the index field directly for struct page.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13841
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
drivers/staging/lustre/lustre/llite/vvp_page.c
drivers/staging/lustre/lustre/osc/osc_request.c

index c50ef8352b10e58b19872a1f5c5ecf659ddff2ad..12fde3ca5b7b67236f267c43bf53f1f4b0ebfed1 100644 (file)
@@ -57,8 +57,6 @@
 #include "../libcfs_cpu.h"
 #endif
 
-#define page_index(p)       ((p)->index)
-
 #if BITS_PER_LONG == 32
 /* limit to lowmem on 32-bit systems */
 #define NUM_CACHEPAGES \
index 69316c191de6b60e2ebb7f3b681a6d4dbaecb5f8..0c92293dbf2eeb9985483704a7cec3db89b12e39 100644 (file)
@@ -394,7 +394,7 @@ static int vvp_page_print(const struct lu_env *env,
                (*printer)(env, cookie, "%lx %d:%d %lx %lu %slru",
                           (long)vmpage->flags, page_count(vmpage),
                           page_mapcount(vmpage), vmpage->private,
-                          page_index(vmpage),
+                          vmpage->index,
                           list_empty(&vmpage->lru) ? "not-" : "");
        }
 
index 4d3eed6ee3f79dfb744beeda54cc19429f848b38..547539c74a7b85a483e52c938d62d3d43bcd0665 100644 (file)
@@ -1934,7 +1934,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,
                pga[i] = &oap->oap_brw_page;
                pga[i]->off = oap->oap_obj_off + oap->oap_page_off;
                CDEBUG(0, "put page %p index %lu oap %p flg %x to pga\n",
-                      pga[i]->pg, page_index(oap->oap_page), oap,
+                      pga[i]->pg, oap->oap_page->index, oap,
                       pga[i]->flag);
                i++;
                cl_req_page_add(env, clerq, page);