diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/config.c | 24 | ||||
-rw-r--r-- | fs/dlm/debug_fs.c | 2 | ||||
-rw-r--r-- | fs/dlm/dir.c | 7 | ||||
-rw-r--r-- | fs/dlm/dlm_internal.h | 1 | ||||
-rw-r--r-- | fs/dlm/lock.c | 6 | ||||
-rw-r--r-- | fs/dlm/lockspace.c | 15 | ||||
-rw-r--r-- | fs/dlm/lowcomms.c | 6 | ||||
-rw-r--r-- | fs/dlm/member.c | 8 | ||||
-rw-r--r-- | fs/dlm/memory.c | 6 | ||||
-rw-r--r-- | fs/dlm/netlink.c | 2 | ||||
-rw-r--r-- | fs/dlm/plock.c | 6 | ||||
-rw-r--r-- | fs/dlm/rcom.c | 2 | ||||
-rw-r--r-- | fs/dlm/requestqueue.c | 2 | ||||
-rw-r--r-- | fs/dlm/user.c | 12 |
14 files changed, 46 insertions, 53 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c index fd9859f92fad..0df243850818 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c | |||
@@ -410,10 +410,10 @@ static struct config_group *make_cluster(struct config_group *g, | |||
410 | struct dlm_comms *cms = NULL; | 410 | struct dlm_comms *cms = NULL; |
411 | void *gps = NULL; | 411 | void *gps = NULL; |
412 | 412 | ||
413 | cl = kzalloc(sizeof(struct dlm_cluster), GFP_KERNEL); | 413 | cl = kzalloc(sizeof(struct dlm_cluster), GFP_NOFS); |
414 | gps = kcalloc(3, sizeof(struct config_group *), GFP_KERNEL); | 414 | gps = kcalloc(3, sizeof(struct config_group *), GFP_NOFS); |
415 | sps = kzalloc(sizeof(struct dlm_spaces), GFP_KERNEL); | 415 | sps = kzalloc(sizeof(struct dlm_spaces), GFP_NOFS); |
416 | cms = kzalloc(sizeof(struct dlm_comms), GFP_KERNEL); | 416 | cms = kzalloc(sizeof(struct dlm_comms), GFP_NOFS); |
417 | 417 | ||
418 | if (!cl || !gps || !sps || !cms) | 418 | if (!cl || !gps || !sps || !cms) |
419 | goto fail; | 419 | goto fail; |
@@ -482,9 +482,9 @@ static struct config_group *make_space(struct config_group *g, const char *name) | |||
482 | struct dlm_nodes *nds = NULL; | 482 | struct dlm_nodes *nds = NULL; |
483 | void *gps = NULL; | 483 | void *gps = NULL; |
484 | 484 | ||
485 | sp = kzalloc(sizeof(struct dlm_space), GFP_KERNEL); | 485 | sp = kzalloc(sizeof(struct dlm_space), GFP_NOFS); |
486 | gps = kcalloc(2, sizeof(struct config_group *), GFP_KERNEL); | 486 | gps = kcalloc(2, sizeof(struct config_group *), GFP_NOFS); |
487 | nds = kzalloc(sizeof(struct dlm_nodes), GFP_KERNEL); | 487 | nds = kzalloc(sizeof(struct dlm_nodes), GFP_NOFS); |
488 | 488 | ||
489 | if (!sp || !gps || !nds) | 489 | if (!sp || !gps || !nds) |
490 | goto fail; | 490 | goto fail; |
@@ -536,7 +536,7 @@ static struct config_item *make_comm(struct config_group *g, const char *name) | |||
536 | { | 536 | { |
537 | struct dlm_comm *cm; | 537 | struct dlm_comm *cm; |
538 | 538 | ||
539 | cm = kzalloc(sizeof(struct dlm_comm), GFP_KERNEL); | 539 | cm = kzalloc(sizeof(struct dlm_comm), GFP_NOFS); |
540 | if (!cm) | 540 | if (!cm) |
541 | return ERR_PTR(-ENOMEM); | 541 | return ERR_PTR(-ENOMEM); |
542 | 542 | ||
@@ -569,7 +569,7 @@ static struct config_item *make_node(struct config_group *g, const char *name) | |||
569 | struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); | 569 | struct dlm_space *sp = config_item_to_space(g->cg_item.ci_parent); |
570 | struct dlm_node *nd; | 570 | struct dlm_node *nd; |
571 | 571 | ||
572 | nd = kzalloc(sizeof(struct dlm_node), GFP_KERNEL); | 572 | nd = kzalloc(sizeof(struct dlm_node), GFP_NOFS); |
573 | if (!nd) | 573 | if (!nd) |
574 | return ERR_PTR(-ENOMEM); | 574 | return ERR_PTR(-ENOMEM); |
575 | 575 | ||
@@ -705,7 +705,7 @@ static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, size_t len) | |||
705 | if (cm->addr_count >= DLM_MAX_ADDR_COUNT) | 705 | if (cm->addr_count >= DLM_MAX_ADDR_COUNT) |
706 | return -ENOSPC; | 706 | return -ENOSPC; |
707 | 707 | ||
708 | addr = kzalloc(sizeof(*addr), GFP_KERNEL); | 708 | addr = kzalloc(sizeof(*addr), GFP_NOFS); |
709 | if (!addr) | 709 | if (!addr) |
710 | return -ENOMEM; | 710 | return -ENOMEM; |
711 | 711 | ||
@@ -868,7 +868,7 @@ int dlm_nodeid_list(char *lsname, int **ids_out, int *ids_count_out, | |||
868 | 868 | ||
869 | ids_count = sp->members_count; | 869 | ids_count = sp->members_count; |
870 | 870 | ||
871 | ids = kcalloc(ids_count, sizeof(int), GFP_KERNEL); | 871 | ids = kcalloc(ids_count, sizeof(int), GFP_NOFS); |
872 | if (!ids) { | 872 | if (!ids) { |
873 | rv = -ENOMEM; | 873 | rv = -ENOMEM; |
874 | goto out; | 874 | goto out; |
@@ -886,7 +886,7 @@ int dlm_nodeid_list(char *lsname, int **ids_out, int *ids_count_out, | |||
886 | if (!new_count) | 886 | if (!new_count) |
887 | goto out_ids; | 887 | goto out_ids; |
888 | 888 | ||
889 | new = kcalloc(new_count, sizeof(int), GFP_KERNEL); | 889 | new = kcalloc(new_count, sizeof(int), GFP_NOFS); |
890 | if (!new) { | 890 | if (!new) { |
891 | kfree(ids); | 891 | kfree(ids); |
892 | rv = -ENOMEM; | 892 | rv = -ENOMEM; |
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index 1c8bb8c3a82e..375a2359b3bf 100644 --- a/fs/dlm/debug_fs.c +++ b/fs/dlm/debug_fs.c | |||
@@ -404,7 +404,7 @@ static void *table_seq_start(struct seq_file *seq, loff_t *pos) | |||
404 | if (bucket >= ls->ls_rsbtbl_size) | 404 | if (bucket >= ls->ls_rsbtbl_size) |
405 | return NULL; | 405 | return NULL; |
406 | 406 | ||
407 | ri = kzalloc(sizeof(struct rsbtbl_iter), GFP_KERNEL); | 407 | ri = kzalloc(sizeof(struct rsbtbl_iter), GFP_NOFS); |
408 | if (!ri) | 408 | if (!ri) |
409 | return NULL; | 409 | return NULL; |
410 | if (n == 0) | 410 | if (n == 0) |
diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c index c4dfa1dcc86f..7b84c1dbc82e 100644 --- a/fs/dlm/dir.c +++ b/fs/dlm/dir.c | |||
@@ -49,8 +49,7 @@ static struct dlm_direntry *get_free_de(struct dlm_ls *ls, int len) | |||
49 | spin_unlock(&ls->ls_recover_list_lock); | 49 | spin_unlock(&ls->ls_recover_list_lock); |
50 | 50 | ||
51 | if (!found) | 51 | if (!found) |
52 | de = kzalloc(sizeof(struct dlm_direntry) + len, | 52 | de = kzalloc(sizeof(struct dlm_direntry) + len, GFP_NOFS); |
53 | ls->ls_allocation); | ||
54 | return de; | 53 | return de; |
55 | } | 54 | } |
56 | 55 | ||
@@ -212,7 +211,7 @@ int dlm_recover_directory(struct dlm_ls *ls) | |||
212 | 211 | ||
213 | dlm_dir_clear(ls); | 212 | dlm_dir_clear(ls); |
214 | 213 | ||
215 | last_name = kmalloc(DLM_RESNAME_MAXLEN, ls->ls_allocation); | 214 | last_name = kmalloc(DLM_RESNAME_MAXLEN, GFP_NOFS); |
216 | if (!last_name) | 215 | if (!last_name) |
217 | goto out; | 216 | goto out; |
218 | 217 | ||
@@ -323,7 +322,7 @@ static int get_entry(struct dlm_ls *ls, int nodeid, char *name, | |||
323 | if (namelen > DLM_RESNAME_MAXLEN) | 322 | if (namelen > DLM_RESNAME_MAXLEN) |
324 | return -EINVAL; | 323 | return -EINVAL; |
325 | 324 | ||
326 | de = kzalloc(sizeof(struct dlm_direntry) + namelen, ls->ls_allocation); | 325 | de = kzalloc(sizeof(struct dlm_direntry) + namelen, GFP_NOFS); |
327 | if (!de) | 326 | if (!de) |
328 | return -ENOMEM; | 327 | return -ENOMEM; |
329 | 328 | ||
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index d01ca0a711db..826d3dc6e0ab 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h | |||
@@ -473,7 +473,6 @@ struct dlm_ls { | |||
473 | int ls_low_nodeid; | 473 | int ls_low_nodeid; |
474 | int ls_total_weight; | 474 | int ls_total_weight; |
475 | int *ls_node_array; | 475 | int *ls_node_array; |
476 | gfp_t ls_allocation; | ||
477 | 476 | ||
478 | struct dlm_rsb ls_stub_rsb; /* for returning errors */ | 477 | struct dlm_rsb ls_stub_rsb; /* for returning errors */ |
479 | struct dlm_lkb ls_stub_lkb; /* for returning errors */ | 478 | struct dlm_lkb ls_stub_lkb; /* for returning errors */ |
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index eb507c453c5f..9c0c1db1e105 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -2689,7 +2689,7 @@ static int _create_message(struct dlm_ls *ls, int mb_len, | |||
2689 | pass into lowcomms_commit and a message buffer (mb) that we | 2689 | pass into lowcomms_commit and a message buffer (mb) that we |
2690 | write our data into */ | 2690 | write our data into */ |
2691 | 2691 | ||
2692 | mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, ls->ls_allocation, &mb); | 2692 | mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, GFP_NOFS, &mb); |
2693 | if (!mh) | 2693 | if (!mh) |
2694 | return -ENOBUFS; | 2694 | return -ENOBUFS; |
2695 | 2695 | ||
@@ -4512,7 +4512,7 @@ int dlm_user_request(struct dlm_ls *ls, struct dlm_user_args *ua, | |||
4512 | } | 4512 | } |
4513 | 4513 | ||
4514 | if (flags & DLM_LKF_VALBLK) { | 4514 | if (flags & DLM_LKF_VALBLK) { |
4515 | ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_KERNEL); | 4515 | ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS); |
4516 | if (!ua->lksb.sb_lvbptr) { | 4516 | if (!ua->lksb.sb_lvbptr) { |
4517 | kfree(ua); | 4517 | kfree(ua); |
4518 | __put_lkb(ls, lkb); | 4518 | __put_lkb(ls, lkb); |
@@ -4582,7 +4582,7 @@ int dlm_user_convert(struct dlm_ls *ls, struct dlm_user_args *ua_tmp, | |||
4582 | ua = lkb->lkb_ua; | 4582 | ua = lkb->lkb_ua; |
4583 | 4583 | ||
4584 | if (flags & DLM_LKF_VALBLK && !ua->lksb.sb_lvbptr) { | 4584 | if (flags & DLM_LKF_VALBLK && !ua->lksb.sb_lvbptr) { |
4585 | ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_KERNEL); | 4585 | ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS); |
4586 | if (!ua->lksb.sb_lvbptr) { | 4586 | if (!ua->lksb.sb_lvbptr) { |
4587 | error = -ENOMEM; | 4587 | error = -ENOMEM; |
4588 | goto out_put; | 4588 | goto out_put; |
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index d489fcc86713..c010ecfc0d29 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c | |||
@@ -430,7 +430,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace, | |||
430 | 430 | ||
431 | error = -ENOMEM; | 431 | error = -ENOMEM; |
432 | 432 | ||
433 | ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_KERNEL); | 433 | ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_NOFS); |
434 | if (!ls) | 434 | if (!ls) |
435 | goto out; | 435 | goto out; |
436 | memcpy(ls->ls_name, name, namelen); | 436 | memcpy(ls->ls_name, name, namelen); |
@@ -443,11 +443,6 @@ static int new_lockspace(const char *name, int namelen, void **lockspace, | |||
443 | if (flags & DLM_LSFL_TIMEWARN) | 443 | if (flags & DLM_LSFL_TIMEWARN) |
444 | set_bit(LSFL_TIMEWARN, &ls->ls_flags); | 444 | set_bit(LSFL_TIMEWARN, &ls->ls_flags); |
445 | 445 | ||
446 | if (flags & DLM_LSFL_FS) | ||
447 | ls->ls_allocation = GFP_NOFS; | ||
448 | else | ||
449 | ls->ls_allocation = GFP_KERNEL; | ||
450 | |||
451 | /* ls_exflags are forced to match among nodes, and we don't | 446 | /* ls_exflags are forced to match among nodes, and we don't |
452 | need to require all nodes to have some flags set */ | 447 | need to require all nodes to have some flags set */ |
453 | ls->ls_exflags = (flags & ~(DLM_LSFL_TIMEWARN | DLM_LSFL_FS | | 448 | 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, | |||
456 | size = dlm_config.ci_rsbtbl_size; | 451 | size = dlm_config.ci_rsbtbl_size; |
457 | ls->ls_rsbtbl_size = size; | 452 | ls->ls_rsbtbl_size = size; |
458 | 453 | ||
459 | ls->ls_rsbtbl = kmalloc(sizeof(struct dlm_rsbtable) * size, GFP_KERNEL); | 454 | ls->ls_rsbtbl = kmalloc(sizeof(struct dlm_rsbtable) * size, GFP_NOFS); |
460 | if (!ls->ls_rsbtbl) | 455 | if (!ls->ls_rsbtbl) |
461 | goto out_lsfree; | 456 | goto out_lsfree; |
462 | for (i = 0; i < size; i++) { | 457 | for (i = 0; i < size; i++) { |
@@ -468,7 +463,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace, | |||
468 | size = dlm_config.ci_lkbtbl_size; | 463 | size = dlm_config.ci_lkbtbl_size; |
469 | ls->ls_lkbtbl_size = size; | 464 | ls->ls_lkbtbl_size = size; |
470 | 465 | ||
471 | ls->ls_lkbtbl = kmalloc(sizeof(struct dlm_lkbtable) * size, GFP_KERNEL); | 466 | ls->ls_lkbtbl = kmalloc(sizeof(struct dlm_lkbtable) * size, GFP_NOFS); |
472 | if (!ls->ls_lkbtbl) | 467 | if (!ls->ls_lkbtbl) |
473 | goto out_rsbfree; | 468 | goto out_rsbfree; |
474 | for (i = 0; i < size; i++) { | 469 | for (i = 0; i < size; i++) { |
@@ -480,7 +475,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace, | |||
480 | size = dlm_config.ci_dirtbl_size; | 475 | size = dlm_config.ci_dirtbl_size; |
481 | ls->ls_dirtbl_size = size; | 476 | ls->ls_dirtbl_size = size; |
482 | 477 | ||
483 | ls->ls_dirtbl = kmalloc(sizeof(struct dlm_dirtable) * size, GFP_KERNEL); | 478 | ls->ls_dirtbl = kmalloc(sizeof(struct dlm_dirtable) * size, GFP_NOFS); |
484 | if (!ls->ls_dirtbl) | 479 | if (!ls->ls_dirtbl) |
485 | goto out_lkbfree; | 480 | goto out_lkbfree; |
486 | for (i = 0; i < size; i++) { | 481 | for (i = 0; i < size; i++) { |
@@ -527,7 +522,7 @@ static int new_lockspace(const char *name, int namelen, void **lockspace, | |||
527 | mutex_init(&ls->ls_requestqueue_mutex); | 522 | mutex_init(&ls->ls_requestqueue_mutex); |
528 | mutex_init(&ls->ls_clear_proc_locks); | 523 | mutex_init(&ls->ls_clear_proc_locks); |
529 | 524 | ||
530 | ls->ls_recover_buf = kmalloc(dlm_config.ci_buffer_size, GFP_KERNEL); | 525 | ls->ls_recover_buf = kmalloc(dlm_config.ci_buffer_size, GFP_NOFS); |
531 | if (!ls->ls_recover_buf) | 526 | if (!ls->ls_recover_buf) |
532 | goto out_dirfree; | 527 | goto out_dirfree; |
533 | 528 | ||
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 70736eb4b516..52cab160893c 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -1060,7 +1060,7 @@ static void init_local(void) | |||
1060 | if (dlm_our_addr(&sas, i)) | 1060 | if (dlm_our_addr(&sas, i)) |
1061 | break; | 1061 | break; |
1062 | 1062 | ||
1063 | addr = kmalloc(sizeof(*addr), GFP_KERNEL); | 1063 | addr = kmalloc(sizeof(*addr), GFP_NOFS); |
1064 | if (!addr) | 1064 | if (!addr) |
1065 | break; | 1065 | break; |
1066 | memcpy(addr, &sas, sizeof(*addr)); | 1066 | memcpy(addr, &sas, sizeof(*addr)); |
@@ -1099,7 +1099,7 @@ static int sctp_listen_for_all(void) | |||
1099 | struct sockaddr_storage localaddr; | 1099 | struct sockaddr_storage localaddr; |
1100 | struct sctp_event_subscribe subscribe; | 1100 | struct sctp_event_subscribe subscribe; |
1101 | int result = -EINVAL, num = 1, i, addr_len; | 1101 | int result = -EINVAL, num = 1, i, addr_len; |
1102 | struct connection *con = nodeid2con(0, GFP_KERNEL); | 1102 | struct connection *con = nodeid2con(0, GFP_NOFS); |
1103 | int bufsize = NEEDED_RMEM; | 1103 | int bufsize = NEEDED_RMEM; |
1104 | 1104 | ||
1105 | if (!con) | 1105 | if (!con) |
@@ -1171,7 +1171,7 @@ out: | |||
1171 | static int tcp_listen_for_all(void) | 1171 | static int tcp_listen_for_all(void) |
1172 | { | 1172 | { |
1173 | struct socket *sock = NULL; | 1173 | struct socket *sock = NULL; |
1174 | struct connection *con = nodeid2con(0, GFP_KERNEL); | 1174 | struct connection *con = nodeid2con(0, GFP_NOFS); |
1175 | int result = -EINVAL; | 1175 | int result = -EINVAL; |
1176 | 1176 | ||
1177 | if (!con) | 1177 | if (!con) |
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index b128775913b2..84f70bfb0baf 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c | |||
@@ -48,7 +48,7 @@ static int dlm_add_member(struct dlm_ls *ls, int nodeid) | |||
48 | struct dlm_member *memb; | 48 | struct dlm_member *memb; |
49 | int w, error; | 49 | int w, error; |
50 | 50 | ||
51 | memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); | 51 | memb = kzalloc(sizeof(struct dlm_member), GFP_NOFS); |
52 | if (!memb) | 52 | if (!memb) |
53 | return -ENOMEM; | 53 | return -ENOMEM; |
54 | 54 | ||
@@ -143,7 +143,7 @@ static void make_member_array(struct dlm_ls *ls) | |||
143 | 143 | ||
144 | ls->ls_total_weight = total; | 144 | ls->ls_total_weight = total; |
145 | 145 | ||
146 | array = kmalloc(sizeof(int) * total, ls->ls_allocation); | 146 | array = kmalloc(sizeof(int) * total, GFP_NOFS); |
147 | if (!array) | 147 | if (!array) |
148 | return; | 148 | return; |
149 | 149 | ||
@@ -226,7 +226,7 @@ int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv, int *neg_out) | |||
226 | continue; | 226 | continue; |
227 | log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]); | 227 | log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]); |
228 | 228 | ||
229 | memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation); | 229 | memb = kzalloc(sizeof(struct dlm_member), GFP_NOFS); |
230 | if (!memb) | 230 | if (!memb) |
231 | return -ENOMEM; | 231 | return -ENOMEM; |
232 | memb->nodeid = rv->new[i]; | 232 | memb->nodeid = rv->new[i]; |
@@ -341,7 +341,7 @@ int dlm_ls_start(struct dlm_ls *ls) | |||
341 | int *ids = NULL, *new = NULL; | 341 | int *ids = NULL, *new = NULL; |
342 | int error, ids_count = 0, new_count = 0; | 342 | int error, ids_count = 0, new_count = 0; |
343 | 343 | ||
344 | rv = kzalloc(sizeof(struct dlm_recover), ls->ls_allocation); | 344 | rv = kzalloc(sizeof(struct dlm_recover), GFP_NOFS); |
345 | if (!rv) | 345 | if (!rv) |
346 | return -ENOMEM; | 346 | return -ENOMEM; |
347 | 347 | ||
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c index c1775b84ebab..8e0d00db004f 100644 --- a/fs/dlm/memory.c +++ b/fs/dlm/memory.c | |||
@@ -39,7 +39,7 @@ char *dlm_allocate_lvb(struct dlm_ls *ls) | |||
39 | { | 39 | { |
40 | char *p; | 40 | char *p; |
41 | 41 | ||
42 | p = kzalloc(ls->ls_lvblen, ls->ls_allocation); | 42 | p = kzalloc(ls->ls_lvblen, GFP_NOFS); |
43 | return p; | 43 | return p; |
44 | } | 44 | } |
45 | 45 | ||
@@ -57,7 +57,7 @@ struct dlm_rsb *dlm_allocate_rsb(struct dlm_ls *ls, int namelen) | |||
57 | 57 | ||
58 | DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,); | 58 | DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,); |
59 | 59 | ||
60 | r = kzalloc(sizeof(*r) + namelen, ls->ls_allocation); | 60 | r = kzalloc(sizeof(*r) + namelen, GFP_NOFS); |
61 | return r; | 61 | return r; |
62 | } | 62 | } |
63 | 63 | ||
@@ -72,7 +72,7 @@ struct dlm_lkb *dlm_allocate_lkb(struct dlm_ls *ls) | |||
72 | { | 72 | { |
73 | struct dlm_lkb *lkb; | 73 | struct dlm_lkb *lkb; |
74 | 74 | ||
75 | lkb = kmem_cache_zalloc(lkb_cache, ls->ls_allocation); | 75 | lkb = kmem_cache_zalloc(lkb_cache, GFP_NOFS); |
76 | return lkb; | 76 | return lkb; |
77 | } | 77 | } |
78 | 78 | ||
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 55ea369f43a9..052095cd592f 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c | |||
@@ -26,7 +26,7 @@ static int prepare_data(u8 cmd, struct sk_buff **skbp, size_t size) | |||
26 | struct sk_buff *skb; | 26 | struct sk_buff *skb; |
27 | void *data; | 27 | void *data; |
28 | 28 | ||
29 | skb = genlmsg_new(size, GFP_KERNEL); | 29 | skb = genlmsg_new(size, GFP_NOFS); |
30 | if (!skb) | 30 | if (!skb) |
31 | return -ENOMEM; | 31 | return -ENOMEM; |
32 | 32 | ||
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 16f682e26c07..2863deb178e2 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -82,7 +82,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
82 | if (!ls) | 82 | if (!ls) |
83 | return -EINVAL; | 83 | return -EINVAL; |
84 | 84 | ||
85 | xop = kzalloc(sizeof(*xop), GFP_KERNEL); | 85 | xop = kzalloc(sizeof(*xop), GFP_NOFS); |
86 | if (!xop) { | 86 | if (!xop) { |
87 | rv = -ENOMEM; | 87 | rv = -ENOMEM; |
88 | goto out; | 88 | goto out; |
@@ -211,7 +211,7 @@ int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
211 | if (!ls) | 211 | if (!ls) |
212 | return -EINVAL; | 212 | return -EINVAL; |
213 | 213 | ||
214 | op = kzalloc(sizeof(*op), GFP_KERNEL); | 214 | op = kzalloc(sizeof(*op), GFP_NOFS); |
215 | if (!op) { | 215 | if (!op) { |
216 | rv = -ENOMEM; | 216 | rv = -ENOMEM; |
217 | goto out; | 217 | goto out; |
@@ -266,7 +266,7 @@ int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
266 | if (!ls) | 266 | if (!ls) |
267 | return -EINVAL; | 267 | return -EINVAL; |
268 | 268 | ||
269 | op = kzalloc(sizeof(*op), GFP_KERNEL); | 269 | op = kzalloc(sizeof(*op), GFP_NOFS); |
270 | if (!op) { | 270 | if (!op) { |
271 | rv = -ENOMEM; | 271 | rv = -ENOMEM; |
272 | goto out; | 272 | goto out; |
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c index 67522c268c14..3c83a49a48a3 100644 --- a/fs/dlm/rcom.c +++ b/fs/dlm/rcom.c | |||
@@ -38,7 +38,7 @@ static int create_rcom(struct dlm_ls *ls, int to_nodeid, int type, int len, | |||
38 | char *mb; | 38 | char *mb; |
39 | int mb_len = sizeof(struct dlm_rcom) + len; | 39 | int mb_len = sizeof(struct dlm_rcom) + len; |
40 | 40 | ||
41 | mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, ls->ls_allocation, &mb); | 41 | mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, GFP_NOFS, &mb); |
42 | if (!mh) { | 42 | if (!mh) { |
43 | log_print("create_rcom to %d type %d len %d ENOBUFS", | 43 | log_print("create_rcom to %d type %d len %d ENOBUFS", |
44 | to_nodeid, type, len); | 44 | to_nodeid, type, len); |
diff --git a/fs/dlm/requestqueue.c b/fs/dlm/requestqueue.c index 7a2307c08911..a44fa22890e1 100644 --- a/fs/dlm/requestqueue.c +++ b/fs/dlm/requestqueue.c | |||
@@ -35,7 +35,7 @@ void dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_message *ms) | |||
35 | struct rq_entry *e; | 35 | struct rq_entry *e; |
36 | int length = ms->m_header.h_length - sizeof(struct dlm_message); | 36 | int length = ms->m_header.h_length - sizeof(struct dlm_message); |
37 | 37 | ||
38 | e = kmalloc(sizeof(struct rq_entry) + length, ls->ls_allocation); | 38 | e = kmalloc(sizeof(struct rq_entry) + length, GFP_NOFS); |
39 | if (!e) { | 39 | if (!e) { |
40 | log_print("dlm_add_requestqueue: out of memory len %d", length); | 40 | log_print("dlm_add_requestqueue: out of memory len %d", length); |
41 | return; | 41 | return; |
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index ebce994ab0b7..e73a4bb572aa 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c | |||
@@ -267,7 +267,7 @@ static int device_user_lock(struct dlm_user_proc *proc, | |||
267 | goto out; | 267 | goto out; |
268 | } | 268 | } |
269 | 269 | ||
270 | ua = kzalloc(sizeof(struct dlm_user_args), GFP_KERNEL); | 270 | ua = kzalloc(sizeof(struct dlm_user_args), GFP_NOFS); |
271 | if (!ua) | 271 | if (!ua) |
272 | goto out; | 272 | goto out; |
273 | ua->proc = proc; | 273 | ua->proc = proc; |
@@ -307,7 +307,7 @@ static int device_user_unlock(struct dlm_user_proc *proc, | |||
307 | if (!ls) | 307 | if (!ls) |
308 | return -ENOENT; | 308 | return -ENOENT; |
309 | 309 | ||
310 | ua = kzalloc(sizeof(struct dlm_user_args), GFP_KERNEL); | 310 | ua = kzalloc(sizeof(struct dlm_user_args), GFP_NOFS); |
311 | if (!ua) | 311 | if (!ua) |
312 | goto out; | 312 | goto out; |
313 | ua->proc = proc; | 313 | ua->proc = proc; |
@@ -352,7 +352,7 @@ static int dlm_device_register(struct dlm_ls *ls, char *name) | |||
352 | 352 | ||
353 | error = -ENOMEM; | 353 | error = -ENOMEM; |
354 | len = strlen(name) + strlen(name_prefix) + 2; | 354 | len = strlen(name) + strlen(name_prefix) + 2; |
355 | ls->ls_device.name = kzalloc(len, GFP_KERNEL); | 355 | ls->ls_device.name = kzalloc(len, GFP_NOFS); |
356 | if (!ls->ls_device.name) | 356 | if (!ls->ls_device.name) |
357 | goto fail; | 357 | goto fail; |
358 | 358 | ||
@@ -520,7 +520,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, | |||
520 | #endif | 520 | #endif |
521 | return -EINVAL; | 521 | return -EINVAL; |
522 | 522 | ||
523 | kbuf = kzalloc(count + 1, GFP_KERNEL); | 523 | kbuf = kzalloc(count + 1, GFP_NOFS); |
524 | if (!kbuf) | 524 | if (!kbuf) |
525 | return -ENOMEM; | 525 | return -ENOMEM; |
526 | 526 | ||
@@ -546,7 +546,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, | |||
546 | 546 | ||
547 | /* add 1 after namelen so that the name string is terminated */ | 547 | /* add 1 after namelen so that the name string is terminated */ |
548 | kbuf = kzalloc(sizeof(struct dlm_write_request) + namelen + 1, | 548 | kbuf = kzalloc(sizeof(struct dlm_write_request) + namelen + 1, |
549 | GFP_KERNEL); | 549 | GFP_NOFS); |
550 | if (!kbuf) { | 550 | if (!kbuf) { |
551 | kfree(k32buf); | 551 | kfree(k32buf); |
552 | return -ENOMEM; | 552 | return -ENOMEM; |
@@ -648,7 +648,7 @@ static int device_open(struct inode *inode, struct file *file) | |||
648 | if (!ls) | 648 | if (!ls) |
649 | return -ENOENT; | 649 | return -ENOENT; |
650 | 650 | ||
651 | proc = kzalloc(sizeof(struct dlm_user_proc), GFP_KERNEL); | 651 | proc = kzalloc(sizeof(struct dlm_user_proc), GFP_NOFS); |
652 | if (!proc) { | 652 | if (!proc) { |
653 | dlm_put_lockspace(ls); | 653 | dlm_put_lockspace(ls); |
654 | return -ENOMEM; | 654 | return -ENOMEM; |