]> git.baikalelectronics.ru Git - kernel.git/commit
target: Fall back to vzalloc upon ->sess_cmd_map kzalloc failure
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 23 Sep 2013 18:57:38 +0000 (11:57 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 2 Oct 2013 04:27:31 +0000 (21:27 -0700)
commitb0a0a4d33e012e5533cbbcf3e352b19da0eab5cd
treebe7a59b7c74b0ec9b5ac6c86c3276bad311ff823
parent8ee33a2bb0dfbe31c3561b856a4a5d1393d4e9d9
target: Fall back to vzalloc upon ->sess_cmd_map kzalloc failure

This patch changes transport_alloc_session_tags() to fall back to
use vzalloc when kzalloc fails for big tag_num that end up generating
larger order allocations.

Also use is_vmalloc_addr() in transport_alloc_session_tags() failure
path, and normal transport_free_session() path to determine when
vfree() needs to be called instead of kfree().

v2 changes:
  - Use  __GFP_NOWARN | __GFP_REPEAT for sess_cmd_map kzalloc (mst)

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Asias He <asias@redhat.com>
Cc: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c