|
@@ -430,7 +430,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
|
|
|
|
|
|
error = -ENOMEM;
|
|
error = -ENOMEM;
|
|
|
|
|
|
- ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_KERNEL);
|
|
|
|
|
|
+ ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_NOFS);
|
|
if (!ls)
|
|
if (!ls)
|
|
goto out;
|
|
goto out;
|
|
memcpy(ls->ls_name, name, namelen);
|
|
memcpy(ls->ls_name, name, namelen);
|
|
@@ -443,11 +443,6 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
|
|
if (flags & DLM_LSFL_TIMEWARN)
|
|
if (flags & DLM_LSFL_TIMEWARN)
|
|
set_bit(LSFL_TIMEWARN, &ls->ls_flags);
|
|
set_bit(LSFL_TIMEWARN, &ls->ls_flags);
|
|
|
|
|
|
- if (flags & DLM_LSFL_FS)
|
|
|
|
- ls->ls_allocation = GFP_NOFS;
|
|
|
|
- else
|
|
|
|
- ls->ls_allocation = GFP_KERNEL;
|
|
|
|
-
|
|
|
|
/* ls_exflags are forced to match among nodes, and we don't
|
|
/* ls_exflags are forced to match among nodes, and we don't
|
|
need to require all nodes to have some flags set */
|
|
need to require all nodes to have some flags set */
|
|
ls->ls_exflags = (flags & ~(DLM_LSFL_TIMEWARN | DLM_LSFL_FS |
|
|
ls->ls_exflags = (flags & ~(DLM_LSFL_TIMEWARN | DLM_LSFL_FS |
|
|
@@ -456,7 +451,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
|
|
size = dlm_config.ci_rsbtbl_size;
|
|
size = dlm_config.ci_rsbtbl_size;
|
|
ls->ls_rsbtbl_size = size;
|
|
ls->ls_rsbtbl_size = size;
|
|
|
|
|
|
- ls->ls_rsbtbl = kmalloc(sizeof(struct dlm_rsbtable) * size, GFP_KERNEL);
|
|
|
|
|
|
+ ls->ls_rsbtbl = kmalloc(sizeof(struct dlm_rsbtable) * size, GFP_NOFS);
|
|
if (!ls->ls_rsbtbl)
|
|
if (!ls->ls_rsbtbl)
|
|
goto out_lsfree;
|
|
goto out_lsfree;
|
|
for (i = 0; i < size; i++) {
|
|
for (i = 0; i < size; i++) {
|
|
@@ -468,7 +463,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
|
|
size = dlm_config.ci_lkbtbl_size;
|
|
size = dlm_config.ci_lkbtbl_size;
|
|
ls->ls_lkbtbl_size = size;
|
|
ls->ls_lkbtbl_size = size;
|
|
|
|
|
|
- ls->ls_lkbtbl = kmalloc(sizeof(struct dlm_lkbtable) * size, GFP_KERNEL);
|
|
|
|
|
|
+ ls->ls_lkbtbl = kmalloc(sizeof(struct dlm_lkbtable) * size, GFP_NOFS);
|
|
if (!ls->ls_lkbtbl)
|
|
if (!ls->ls_lkbtbl)
|
|
goto out_rsbfree;
|
|
goto out_rsbfree;
|
|
for (i = 0; i < size; i++) {
|
|
for (i = 0; i < size; i++) {
|
|
@@ -480,7 +475,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
|
|
size = dlm_config.ci_dirtbl_size;
|
|
size = dlm_config.ci_dirtbl_size;
|
|
ls->ls_dirtbl_size = size;
|
|
ls->ls_dirtbl_size = size;
|
|
|
|
|
|
- ls->ls_dirtbl = kmalloc(sizeof(struct dlm_dirtable) * size, GFP_KERNEL);
|
|
|
|
|
|
+ ls->ls_dirtbl = kmalloc(sizeof(struct dlm_dirtable) * size, GFP_NOFS);
|
|
if (!ls->ls_dirtbl)
|
|
if (!ls->ls_dirtbl)
|
|
goto out_lkbfree;
|
|
goto out_lkbfree;
|
|
for (i = 0; i < size; i++) {
|
|
for (i = 0; i < size; i++) {
|
|
@@ -527,7 +522,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
|
|
mutex_init(&ls->ls_requestqueue_mutex);
|
|
mutex_init(&ls->ls_requestqueue_mutex);
|
|
mutex_init(&ls->ls_clear_proc_locks);
|
|
mutex_init(&ls->ls_clear_proc_locks);
|
|
|
|
|
|
- ls->ls_recover_buf = kmalloc(dlm_config.ci_buffer_size, GFP_KERNEL);
|
|
|
|
|
|
+ ls->ls_recover_buf = kmalloc(dlm_config.ci_buffer_size, GFP_NOFS);
|
|
if (!ls->ls_recover_buf)
|
|
if (!ls->ls_recover_buf)
|
|
goto out_dirfree;
|
|
goto out_dirfree;
|
|
|
|
|