mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	James Simmons <jsimmons@infradead.org>,
	James Simmons <uja.ornl@gmail.com>
Subject: [PATCH 3/6] staging: lustre: libcfs: remove page_index() macro
Date: Thu, 31 Mar 2016 10:18:37 -0400	[thread overview]
Message-ID: <1459433920-23644-4-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1459433920-23644-1-git-send-email-jsimmons@infradead.org>

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>
---
 .../lustre/include/linux/libcfs/linux/linux-mem.h  |    2 --
 drivers/staging/lustre/lustre/llite/vvp_page.c     |    2 +-
 drivers/staging/lustre/lustre/osc/osc_request.c    |    2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
index c50ef83..12fde3c 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
@@ -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 \
diff --git a/drivers/staging/lustre/lustre/llite/vvp_page.c b/drivers/staging/lustre/lustre/llite/vvp_page.c
index 69316c1..0c92293 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_page.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_page.c
@@ -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-" : "");
 	}
 
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 4d3eed6..547539c 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -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);
-- 
1.7.1

  parent reply	other threads:[~2016-03-31 14:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 14:18 [PATCH 0/6] cleanup libcfs memory handling James Simmons
2016-03-31 14:18 ` [PATCH 1/6] staging: lustre: libcfs: move add_wait_queue_exclusive_head to lustre layer James Simmons
2016-03-31 14:18 ` [PATCH 2/6] staging: lustre: libcfs: move memory_pressure functions to libcfs_prim.h James Simmons
2016-03-31 20:03   ` Greg Kroah-Hartman
2016-03-31 20:33     ` [lustre-devel] " Simmons, James A.
2016-03-31 14:18 ` James Simmons [this message]
2016-03-31 14:18 ` [PATCH 4/6] staging: lustre: libcfs: remove MMSPACE macros James Simmons
2016-03-31 14:18 ` [PATCH 5/6] staging: lustre: libcfs: move NUM_CACHEPAGES to libcfs_prim.h James Simmons
2016-03-31 14:18 ` [PATCH 6/6] staging: lustre: libcfs: delete linux-mem.h James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459433920-23644-4-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    --cc=uja.ornl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®