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


Groups > linux.kernel > #1225615 > unrolled thread

[PATCH 04/19] staging/lustre: Remove users of OBD_ALLOC/FREE_PTR lu_object.h

Started bygreen@linuxhacker.ru
First post2015-09-16 02:40 +0200
Last post2015-09-16 02:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 04/19] staging/lustre: Remove users of OBD_ALLOC/FREE_PTR lu_object.h green@linuxhacker.ru - 2015-09-16 02:40 +0200

#1225615 — [PATCH 04/19] staging/lustre: Remove users of OBD_ALLOC/FREE_PTR lu_object.h

Fromgreen@linuxhacker.ru
Date2015-09-16 02:40 +0200
Subject[PATCH 04/19] staging/lustre: Remove users of OBD_ALLOC/FREE_PTR lu_object.h
Message-ID<q98Vs-5ap-15@gated-at.bofh.it>
From: Oleg Drokin <green@linuxhacker.ru>

These are converted to regular kzalloc/kfree calls.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
 drivers/staging/lustre/lustre/include/lu_object.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h
index 96e271d..7756008 100644
--- a/drivers/staging/lustre/lustre/include/lu_object.h
+++ b/drivers/staging/lustre/lustre/include/lu_object.h
@@ -1126,7 +1126,7 @@ struct lu_context_key {
 								  \
 		CLASSERT(PAGE_CACHE_SIZE >= sizeof (*value));       \
 								  \
-		OBD_ALLOC_PTR(value);			     \
+		value = kzalloc(sizeof(*value), GFP_NOFS);	\
 		if (value == NULL)				\
 			value = ERR_PTR(-ENOMEM);		 \
 								  \
@@ -1140,7 +1140,7 @@ struct lu_context_key {
 	{								   \
 		type *info = data;					  \
 									    \
-		OBD_FREE_PTR(info);					 \
+		kfree(info);					 \
 	}								   \
 	struct __##mod##__dummy_fini {; } /* semicolon catcher */
 
-- 
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/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web