···404 if (bucket >= ls->ls_rsbtbl_size)405 return NULL;406407- ri = kzalloc(sizeof(struct rsbtbl_iter), GFP_KERNEL);408 if (!ri)409 return NULL;410 if (n == 0)
···404 if (bucket >= ls->ls_rsbtbl_size)405 return NULL;406407+ ri = kzalloc(sizeof(struct rsbtbl_iter), GFP_NOFS);408 if (!ri)409 return NULL;410 if (n == 0)
+3-4
fs/dlm/dir.c
···49 spin_unlock(&ls->ls_recover_list_lock);5051 if (!found)52- de = kzalloc(sizeof(struct dlm_direntry) + len,53- ls->ls_allocation);54 return de;55}56···211212 dlm_dir_clear(ls);213214- last_name = kmalloc(DLM_RESNAME_MAXLEN, ls->ls_allocation);215 if (!last_name)216 goto out;217···322 if (namelen > DLM_RESNAME_MAXLEN)323 return -EINVAL;324325- de = kzalloc(sizeof(struct dlm_direntry) + namelen, ls->ls_allocation);326 if (!de)327 return -ENOMEM;328
···49 spin_unlock(&ls->ls_recover_list_lock);5051 if (!found)52+ de = kzalloc(sizeof(struct dlm_direntry) + len, GFP_NOFS);053 return de;54}55···212213 dlm_dir_clear(ls);214215+ last_name = kmalloc(DLM_RESNAME_MAXLEN, GFP_NOFS);216 if (!last_name)217 goto out;218···323 if (namelen > DLM_RESNAME_MAXLEN)324 return -EINVAL;325326+ de = kzalloc(sizeof(struct dlm_direntry) + namelen, GFP_NOFS);327 if (!de)328 return -ENOMEM;329
-1
fs/dlm/dlm_internal.h
···473 int ls_low_nodeid;474 int ls_total_weight;475 int *ls_node_array;476- gfp_t ls_allocation;477478 struct dlm_rsb ls_stub_rsb; /* for returning errors */479 struct dlm_lkb ls_stub_lkb; /* for returning errors */
···473 int ls_low_nodeid;474 int ls_total_weight;475 int *ls_node_array;0476477 struct dlm_rsb ls_stub_rsb; /* for returning errors */478 struct dlm_lkb ls_stub_lkb; /* for returning errors */
+3-3
fs/dlm/lock.c
···2689 pass into lowcomms_commit and a message buffer (mb) that we2690 write our data into */26912692- mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, ls->ls_allocation, &mb);2693 if (!mh)2694 return -ENOBUFS;2695···4512 }45134514 if (flags & DLM_LKF_VALBLK) {4515- ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_KERNEL);4516 if (!ua->lksb.sb_lvbptr) {4517 kfree(ua);4518 __put_lkb(ls, lkb);···4582 ua = lkb->lkb_ua;45834584 if (flags & DLM_LKF_VALBLK && !ua->lksb.sb_lvbptr) {4585- ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_KERNEL);4586 if (!ua->lksb.sb_lvbptr) {4587 error = -ENOMEM;4588 goto out_put;
···2689 pass into lowcomms_commit and a message buffer (mb) that we2690 write our data into */26912692+ mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, GFP_NOFS, &mb);2693 if (!mh)2694 return -ENOBUFS;2695···4512 }45134514 if (flags & DLM_LKF_VALBLK) {4515+ ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS);4516 if (!ua->lksb.sb_lvbptr) {4517 kfree(ua);4518 __put_lkb(ls, lkb);···4582 ua = lkb->lkb_ua;45834584 if (flags & DLM_LKF_VALBLK && !ua->lksb.sb_lvbptr) {4585+ ua->lksb.sb_lvbptr = kzalloc(DLM_USER_LVB_LEN, GFP_NOFS);4586 if (!ua->lksb.sb_lvbptr) {4587 error = -ENOMEM;4588 goto out_put;
+5-10
fs/dlm/lockspace.c
···430431 error = -ENOMEM;432433- ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_KERNEL);434 if (!ls)435 goto out;436 memcpy(ls->ls_name, name, namelen);···443 if (flags & DLM_LSFL_TIMEWARN)444 set_bit(LSFL_TIMEWARN, &ls->ls_flags);445446- if (flags & DLM_LSFL_FS)447- ls->ls_allocation = GFP_NOFS;448- else449- ls->ls_allocation = GFP_KERNEL;450-451 /* ls_exflags are forced to match among nodes, and we don't452 need to require all nodes to have some flags set */453 ls->ls_exflags = (flags & ~(DLM_LSFL_TIMEWARN | DLM_LSFL_FS |···451 size = dlm_config.ci_rsbtbl_size;452 ls->ls_rsbtbl_size = size;453454- ls->ls_rsbtbl = kmalloc(sizeof(struct dlm_rsbtable) * size, GFP_KERNEL);455 if (!ls->ls_rsbtbl)456 goto out_lsfree;457 for (i = 0; i < size; i++) {···463 size = dlm_config.ci_lkbtbl_size;464 ls->ls_lkbtbl_size = size;465466- ls->ls_lkbtbl = kmalloc(sizeof(struct dlm_lkbtable) * size, GFP_KERNEL);467 if (!ls->ls_lkbtbl)468 goto out_rsbfree;469 for (i = 0; i < size; i++) {···475 size = dlm_config.ci_dirtbl_size;476 ls->ls_dirtbl_size = size;477478- ls->ls_dirtbl = kmalloc(sizeof(struct dlm_dirtable) * size, GFP_KERNEL);479 if (!ls->ls_dirtbl)480 goto out_lkbfree;481 for (i = 0; i < size; i++) {···522 mutex_init(&ls->ls_requestqueue_mutex);523 mutex_init(&ls->ls_clear_proc_locks);524525- ls->ls_recover_buf = kmalloc(dlm_config.ci_buffer_size, GFP_KERNEL);526 if (!ls->ls_recover_buf)527 goto out_dirfree;528
···430431 error = -ENOMEM;432433+ ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_NOFS);434 if (!ls)435 goto out;436 memcpy(ls->ls_name, name, namelen);···443 if (flags & DLM_LSFL_TIMEWARN)444 set_bit(LSFL_TIMEWARN, &ls->ls_flags);44500000446 /* ls_exflags are forced to match among nodes, and we don't447 need to require all nodes to have some flags set */448 ls->ls_exflags = (flags & ~(DLM_LSFL_TIMEWARN | DLM_LSFL_FS |···456 size = dlm_config.ci_rsbtbl_size;457 ls->ls_rsbtbl_size = size;458459+ ls->ls_rsbtbl = kmalloc(sizeof(struct dlm_rsbtable) * size, GFP_NOFS);460 if (!ls->ls_rsbtbl)461 goto out_lsfree;462 for (i = 0; i < size; i++) {···468 size = dlm_config.ci_lkbtbl_size;469 ls->ls_lkbtbl_size = size;470471+ ls->ls_lkbtbl = kmalloc(sizeof(struct dlm_lkbtable) * size, GFP_NOFS);472 if (!ls->ls_lkbtbl)473 goto out_rsbfree;474 for (i = 0; i < size; i++) {···480 size = dlm_config.ci_dirtbl_size;481 ls->ls_dirtbl_size = size;482483+ ls->ls_dirtbl = kmalloc(sizeof(struct dlm_dirtable) * size, GFP_NOFS);484 if (!ls->ls_dirtbl)485 goto out_lkbfree;486 for (i = 0; i < size; i++) {···527 mutex_init(&ls->ls_requestqueue_mutex);528 mutex_init(&ls->ls_clear_proc_locks);529530+ ls->ls_recover_buf = kmalloc(dlm_config.ci_buffer_size, GFP_NOFS);531 if (!ls->ls_recover_buf)532 goto out_dirfree;533
+3-3
fs/dlm/lowcomms.c
···1060 if (dlm_our_addr(&sas, i))1061 break;10621063- addr = kmalloc(sizeof(*addr), GFP_KERNEL);1064 if (!addr)1065 break;1066 memcpy(addr, &sas, sizeof(*addr));···1099 struct sockaddr_storage localaddr;1100 struct sctp_event_subscribe subscribe;1101 int result = -EINVAL, num = 1, i, addr_len;1102- struct connection *con = nodeid2con(0, GFP_KERNEL);1103 int bufsize = NEEDED_RMEM;11041105 if (!con)···1171static int tcp_listen_for_all(void)1172{1173 struct socket *sock = NULL;1174- struct connection *con = nodeid2con(0, GFP_KERNEL);1175 int result = -EINVAL;11761177 if (!con)
···1060 if (dlm_our_addr(&sas, i))1061 break;10621063+ addr = kmalloc(sizeof(*addr), GFP_NOFS);1064 if (!addr)1065 break;1066 memcpy(addr, &sas, sizeof(*addr));···1099 struct sockaddr_storage localaddr;1100 struct sctp_event_subscribe subscribe;1101 int result = -EINVAL, num = 1, i, addr_len;1102+ struct connection *con = nodeid2con(0, GFP_NOFS);1103 int bufsize = NEEDED_RMEM;11041105 if (!con)···1171static int tcp_listen_for_all(void)1172{1173 struct socket *sock = NULL;1174+ struct connection *con = nodeid2con(0, GFP_NOFS);1175 int result = -EINVAL;11761177 if (!con)
+4-4
fs/dlm/member.c
···48 struct dlm_member *memb;49 int w, error;5051- memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation);52 if (!memb)53 return -ENOMEM;54···143144 ls->ls_total_weight = total;145146- array = kmalloc(sizeof(int) * total, ls->ls_allocation);147 if (!array)148 return;149···226 continue;227 log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]);228229- memb = kzalloc(sizeof(struct dlm_member), ls->ls_allocation);230 if (!memb)231 return -ENOMEM;232 memb->nodeid = rv->new[i];···341 int *ids = NULL, *new = NULL;342 int error, ids_count = 0, new_count = 0;343344- rv = kzalloc(sizeof(struct dlm_recover), ls->ls_allocation);345 if (!rv)346 return -ENOMEM;347
···48 struct dlm_member *memb;49 int w, error;5051+ memb = kzalloc(sizeof(struct dlm_member), GFP_NOFS);52 if (!memb)53 return -ENOMEM;54···143144 ls->ls_total_weight = total;145146+ array = kmalloc(sizeof(int) * total, GFP_NOFS);147 if (!array)148 return;149···226 continue;227 log_debug(ls, "new nodeid %d is a re-added member", rv->new[i]);228229+ memb = kzalloc(sizeof(struct dlm_member), GFP_NOFS);230 if (!memb)231 return -ENOMEM;232 memb->nodeid = rv->new[i];···341 int *ids = NULL, *new = NULL;342 int error, ids_count = 0, new_count = 0;343344+ rv = kzalloc(sizeof(struct dlm_recover), GFP_NOFS);345 if (!rv)346 return -ENOMEM;347
···82 if (!ls)83 return -EINVAL;8485- xop = kzalloc(sizeof(*xop), GFP_KERNEL);86 if (!xop) {87 rv = -ENOMEM;88 goto out;···211 if (!ls)212 return -EINVAL;213214- op = kzalloc(sizeof(*op), GFP_KERNEL);215 if (!op) {216 rv = -ENOMEM;217 goto out;···266 if (!ls)267 return -EINVAL;268269- op = kzalloc(sizeof(*op), GFP_KERNEL);270 if (!op) {271 rv = -ENOMEM;272 goto out;
···82 if (!ls)83 return -EINVAL;8485+ xop = kzalloc(sizeof(*xop), GFP_NOFS);86 if (!xop) {87 rv = -ENOMEM;88 goto out;···211 if (!ls)212 return -EINVAL;213214+ op = kzalloc(sizeof(*op), GFP_NOFS);215 if (!op) {216 rv = -ENOMEM;217 goto out;···266 if (!ls)267 return -EINVAL;268269+ op = kzalloc(sizeof(*op), GFP_NOFS);270 if (!op) {271 rv = -ENOMEM;272 goto out;
+1-1
fs/dlm/rcom.c
···38 char *mb;39 int mb_len = sizeof(struct dlm_rcom) + len;4041- mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, ls->ls_allocation, &mb);42 if (!mh) {43 log_print("create_rcom to %d type %d len %d ENOBUFS",44 to_nodeid, type, len);
···38 char *mb;39 int mb_len = sizeof(struct dlm_rcom) + len;4041+ mh = dlm_lowcomms_get_buffer(to_nodeid, mb_len, GFP_NOFS, &mb);42 if (!mh) {43 log_print("create_rcom to %d type %d len %d ENOBUFS",44 to_nodeid, type, len);
+1-1
fs/dlm/requestqueue.c
···35 struct rq_entry *e;36 int length = ms->m_header.h_length - sizeof(struct dlm_message);3738- e = kmalloc(sizeof(struct rq_entry) + length, ls->ls_allocation);39 if (!e) {40 log_print("dlm_add_requestqueue: out of memory len %d", length);41 return;
···35 struct rq_entry *e;36 int length = ms->m_header.h_length - sizeof(struct dlm_message);3738+ e = kmalloc(sizeof(struct rq_entry) + length, GFP_NOFS);39 if (!e) {40 log_print("dlm_add_requestqueue: out of memory len %d", length);41 return;
+6-6
fs/dlm/user.c
···267 goto out;268 }269270- ua = kzalloc(sizeof(struct dlm_user_args), GFP_KERNEL);271 if (!ua)272 goto out;273 ua->proc = proc;···307 if (!ls)308 return -ENOENT;309310- ua = kzalloc(sizeof(struct dlm_user_args), GFP_KERNEL);311 if (!ua)312 goto out;313 ua->proc = proc;···352353 error = -ENOMEM;354 len = strlen(name) + strlen(name_prefix) + 2;355- ls->ls_device.name = kzalloc(len, GFP_KERNEL);356 if (!ls->ls_device.name)357 goto fail;358···520#endif521 return -EINVAL;522523- kbuf = kzalloc(count + 1, GFP_KERNEL);524 if (!kbuf)525 return -ENOMEM;526···546547 /* add 1 after namelen so that the name string is terminated */548 kbuf = kzalloc(sizeof(struct dlm_write_request) + namelen + 1,549- GFP_KERNEL);550 if (!kbuf) {551 kfree(k32buf);552 return -ENOMEM;···648 if (!ls)649 return -ENOENT;650651- proc = kzalloc(sizeof(struct dlm_user_proc), GFP_KERNEL);652 if (!proc) {653 dlm_put_lockspace(ls);654 return -ENOMEM;
···267 goto out;268 }269270+ ua = kzalloc(sizeof(struct dlm_user_args), GFP_NOFS);271 if (!ua)272 goto out;273 ua->proc = proc;···307 if (!ls)308 return -ENOENT;309310+ ua = kzalloc(sizeof(struct dlm_user_args), GFP_NOFS);311 if (!ua)312 goto out;313 ua->proc = proc;···352353 error = -ENOMEM;354 len = strlen(name) + strlen(name_prefix) + 2;355+ ls->ls_device.name = kzalloc(len, GFP_NOFS);356 if (!ls->ls_device.name)357 goto fail;358···520#endif521 return -EINVAL;522523+ kbuf = kzalloc(count + 1, GFP_NOFS);524 if (!kbuf)525 return -ENOMEM;526···546547 /* add 1 after namelen so that the name string is terminated */548 kbuf = kzalloc(sizeof(struct dlm_write_request) + namelen + 1,549+ GFP_NOFS);550 if (!kbuf) {551 kfree(k32buf);552 return -ENOMEM;···648 if (!ls)649 return -ENOENT;650651+ proc = kzalloc(sizeof(struct dlm_user_proc), GFP_NOFS);652 if (!proc) {653 dlm_put_lockspace(ls);654 return -ENOMEM;