Switch KM_SLEEP to KM_PUSHPAGE

This warning indicates the incorrect use of KM_SLEEP in a call
path which must use KM_PUSHPAGE to avoid deadlocking in direct
reclaim.  See commit b8d06fca08
for additional details.

  SPL: Fixing allocation for task txg_sync (6093) which
  used GFP flags 0x297bda7c with PF_NOFS set

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #917
This commit is contained in:
Brian Behlendorf 2012-08-31 07:45:27 -07:00
parent 2b2861362f
commit b404a3f07f

View File

@ -672,7 +672,7 @@ zfs_zevent_destroy(zfs_zevent_t *ze)
static void * static void *
i_fm_alloc(nv_alloc_t *nva, size_t size) i_fm_alloc(nv_alloc_t *nva, size_t size)
{ {
return (kmem_zalloc(size, KM_SLEEP)); return (kmem_zalloc(size, KM_PUSHPAGE));
} }
/* ARGSUSED */ /* ARGSUSED */
@ -740,7 +740,7 @@ fm_nvlist_create(nv_alloc_t *nva)
nv_alloc_t *nvhdl; nv_alloc_t *nvhdl;
if (nva == NULL) { if (nva == NULL) {
nvhdl = kmem_zalloc(sizeof (nv_alloc_t), KM_SLEEP); nvhdl = kmem_zalloc(sizeof (nv_alloc_t), KM_PUSHPAGE);
if (nv_alloc_init(nvhdl, &fm_mem_alloc_ops, NULL, 0) != 0) { if (nv_alloc_init(nvhdl, &fm_mem_alloc_ops, NULL, 0) != 0) {
kmem_free(nvhdl, sizeof (nv_alloc_t)); kmem_free(nvhdl, sizeof (nv_alloc_t));