Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225627

[PATCH 01/19] staging/lustre: Remove OBD_CPT_ALLOC_LARGE

From green@linuxhacker.ru
Newsgroups linux.kernel
Subject [PATCH 01/19] staging/lustre: Remove OBD_CPT_ALLOC_LARGE
Date 2015-09-16 02:40 +0200
Message-ID <q98Vt-5ap-41@gated-at.bofh.it> (permalink)
References <q98Vr-5ap-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Oleg Drokin <green@linuxhacker.ru>

Remove OBD_CPT_ALLOC_LARGE define and convert the only user to
libcfs_kvzalloc_cpt.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 drivers/staging/lustre/lustre/include/obd_support.h | 5 -----
 drivers/staging/lustre/lustre/ptlrpc/service.c      | 6 ++++--
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h
index 30f22d9..b746763 100644
--- a/drivers/staging/lustre/lustre/include/obd_support.h
+++ b/drivers/staging/lustre/lustre/include/obd_support.h
@@ -634,11 +634,6 @@ do {									  \
 	ptr = libcfs_kvzalloc(size, GFP_NOFS);				  \
 } while (0)
 
-#define OBD_CPT_ALLOC_LARGE(ptr, cptab, cpt, size)			      \
-do {									      \
-	ptr = libcfs_kvzalloc_cpt(cptab, cpt, size, GFP_NOFS);		      \
-} while (0)
-
 #define OBD_FREE_LARGE(ptr, size)					     \
 do {									  \
 	(void)(size);							\
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index 003344c..40de622 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -86,8 +86,10 @@ ptlrpc_alloc_rqbd(struct ptlrpc_service_part *svcpt)
 	rqbd->rqbd_cbid.cbid_fn = request_in_callback;
 	rqbd->rqbd_cbid.cbid_arg = rqbd;
 	INIT_LIST_HEAD(&rqbd->rqbd_reqs);
-	OBD_CPT_ALLOC_LARGE(rqbd->rqbd_buffer, svc->srv_cptable,
-			    svcpt->scp_cpt, svc->srv_buf_size);
+	rqbd->rqbd_buffer = libcfs_kvzalloc_cpt(svc->srv_cptable,
+						svcpt->scp_cpt,
+						svc->srv_buf_size,
+						GFP_KERNEL);
 	if (rqbd->rqbd_buffer == NULL) {
 		kfree(rqbd);
 		return NULL;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/19] Lustre cleanups green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 05/19] staging/lustre/llite: Get rid of OBD_ALLOC/FREE_PTR green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 02/19] staging/lustre: Remove unused OBD_VMALLOC green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 17/19] staging/lustre: Remove IS_SERVER and all users green@linuxhacker.ru - 2015-09-16 02:40 +0200
    Re: [PATCH 17/19] staging/lustre: Remove IS_SERVER and all users Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-16 07:40 +0200
      Re: [PATCH 17/19] staging/lustre: Remove IS_SERVER and all users Oleg Drokin <green@linuxhacker.ru> - 2015-09-16 17:10 +0200
  [PATCH 16/19] staging/lustre: remove obd_memory stats counter green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 10/19] staging/lustre/ptlrpc: Replace OBD_FREE_PTR with kfree green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 01/19] staging/lustre: Remove OBD_CPT_ALLOC_LARGE green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 07/19] staging/lustre: Remove references to OBD_ALLOC/FREE* in comments green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 11/19] staging/lustre: Replace last users of OBD_ALLOC/FREE_LARGE green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 18/19] staging/lustre: remove IS_MDS|IS_OST|IS_MGS defines and users green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 06/19] staging/lustre/obdclass: replace OBD_ALLOC_GFP with kzalloc green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 09/19] staging/lustre: Convert lustre_cfg_new/free to use kzalloc/kfree green@linuxhacker.ru - 2015-09-16 02:40 +0200
  [PATCH 14/19] staging/lustre: Remove memory allocation fault injection framework green@linuxhacker.ru - 2015-09-16 02:40 +0200

csiph-web