[lustre-devel] [PATCH 2/9] lustre: llog: use GFP_KERNEL for all allocations.
NeilBrown
neilb at suse.com
Sun Jul 22 23:23:04 PDT 2018
Processing the log happens at mount time so
memory allocations will not trigger write-out to
this filesystem which might deadlock.
So use of GFP_NOFS is not needed.
GFP_KERNEL is preferred, especially for kvmalloc()
which doesn't try the 'vmalloc' option when
GFP_KERNEL is not specified.
Signed-off-by: NeilBrown <neilb at suse.com>
---
drivers/staging/lustre/lustre/obdclass/llog.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c
index f59f89a76c91..8644d349535e 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog.c
@@ -59,7 +59,7 @@ static struct llog_handle *llog_alloc_handle(void)
{
struct llog_handle *loghandle;
- loghandle = kzalloc(sizeof(*loghandle), GFP_NOFS);
+ loghandle = kzalloc(sizeof(*loghandle), GFP_KERNEL);
if (!loghandle)
return NULL;
@@ -242,7 +242,7 @@ static int llog_process_thread(void *arg)
/* expect chunk_size to be power of two */
LASSERT(is_power_of_2(chunk_size));
- buf = kvzalloc(chunk_size, GFP_NOFS);
+ buf = kvzalloc(chunk_size, GFP_KERNEL);
if (!buf) {
lpi->lpi_rc = -ENOMEM;
return 0;
@@ -421,7 +421,7 @@ int llog_process_or_fork(const struct lu_env *env,
struct llog_process_info *lpi;
int rc;
- lpi = kzalloc(sizeof(*lpi), GFP_NOFS);
+ lpi = kzalloc(sizeof(*lpi), GFP_KERNEL);
if (!lpi)
return -ENOMEM;
lpi->lpi_loghandle = loghandle;
More information about the lustre-devel
mailing list