Thread: [Linux1394-cvslog] rev 853 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2003-04-06 15:22:31
|
Author: bencollins Date: 2003-04-06 11:21:44 -0400 (Sun, 06 Apr 2003) New Revision: 853 Modified: trunk/ieee1394_core.c Log: Patch from AC branch to alleviate some sleep problems in atomic context. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2003-04-06 11:21:45.000000000 -0400 @@ -127,9 +127,8 @@ { struct hpsb_packet *packet = NULL; void *data = NULL; - int kmflags = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; - packet = kmem_cache_alloc(hpsb_packet_cache, kmflags); + packet = kmem_cache_alloc(hpsb_packet_cache, GFP_ATOMIC); if (packet == NULL) return NULL; @@ -137,7 +136,7 @@ packet->header = packet->embedded_header; if (data_size) { - data = kmalloc(data_size + 8, kmflags); + data = kmalloc(data_size + 8, GFP_ATOMIC); if (data == NULL) { kmem_cache_free(hpsb_packet_cache, packet); return NULL; @@ -493,8 +492,7 @@ quadlet_t *data; size_t size=packet->data_size+packet->header_size; - int kmflags = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; - data = kmalloc(packet->header_size + packet->data_size, kmflags); + data = kmalloc(packet->header_size + packet->data_size, GFP_ATOMIC); if (!data) { HPSB_ERR("unable to allocate memory for concatenating header and data"); return 0; |