libiscsi.c (45465487897a1c6d508b14b904dc5777f7ec7e04) libiscsi.c (c1e13f25674ed564948ecb7dfe5f83e578892896)
1/*
2 * iSCSI lib functions
3 *
4 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
5 * Copyright (C) 2004 - 2006 Mike Christie
6 * Copyright (C) 2004 - 2005 Dmitry Yusupov
7 * Copyright (C) 2004 - 2005 Alex Aizman
8 * maintained by open-iscsi@googlegroups.com

--- 2447 unchanged lines hidden (view full) ---

2456 /* If the user passed an items pointer, he wants a copy of
2457 * the array. */
2458 if (items)
2459 num_arrays++;
2460 q->pool = kzalloc(num_arrays * max * sizeof(void*), GFP_KERNEL);
2461 if (q->pool == NULL)
2462 return -ENOMEM;
2463
1/*
2 * iSCSI lib functions
3 *
4 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
5 * Copyright (C) 2004 - 2006 Mike Christie
6 * Copyright (C) 2004 - 2005 Dmitry Yusupov
7 * Copyright (C) 2004 - 2005 Alex Aizman
8 * maintained by open-iscsi@googlegroups.com

--- 2447 unchanged lines hidden (view full) ---

2456 /* If the user passed an items pointer, he wants a copy of
2457 * the array. */
2458 if (items)
2459 num_arrays++;
2460 q->pool = kzalloc(num_arrays * max * sizeof(void*), GFP_KERNEL);
2461 if (q->pool == NULL)
2462 return -ENOMEM;
2463
2464 kfifo_init(&q->queue, (void*)q->pool, max * sizeof(void*), NULL);
2464 kfifo_init(&q->queue, (void*)q->pool, max * sizeof(void*));
2465
2466 for (i = 0; i < max; i++) {
2467 q->pool[i] = kzalloc(item_size, GFP_KERNEL);
2468 if (q->pool[i] == NULL) {
2469 q->max = i;
2470 goto enomem;
2471 }
2472 __kfifo_put(&q->queue, (void*)&q->pool[i], sizeof(void*));

--- 926 unchanged lines hidden ---
2465
2466 for (i = 0; i < max; i++) {
2467 q->pool[i] = kzalloc(item_size, GFP_KERNEL);
2468 if (q->pool[i] == NULL) {
2469 q->max = i;
2470 goto enomem;
2471 }
2472 __kfifo_put(&q->queue, (void*)&q->pool[i], sizeof(void*));

--- 926 unchanged lines hidden ---