Skip to content

Commit

Permalink
Switch KM_SLEEP to KM_PUSHPAGE
Browse files Browse the repository at this point in the history
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 b8d06fc
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 <[email protected]>
Issue #917
  • Loading branch information
behlendorf committed Sep 5, 2012
1 parent 0ef0ff5 commit cafa970
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions module/zfs/zap_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ zap_leaf_array_match(zap_leaf_t *l, zap_name_t *zn,

ASSERT(zn->zn_key_intlen == sizeof (*thiskey));
thiskey = kmem_alloc(array_numints * sizeof (*thiskey),
KM_SLEEP);
KM_PUSHPAGE);

zap_leaf_array_read(l, chunk, sizeof (*thiskey), array_numints,
sizeof (*thiskey), array_numints, thiskey);
Expand All @@ -353,7 +353,7 @@ zap_leaf_array_match(zap_leaf_t *l, zap_name_t *zn,

ASSERT(zn->zn_key_intlen == 1);
if (zn->zn_matchtype == MT_FIRST) {
char *thisname = kmem_alloc(array_numints, KM_SLEEP);
char *thisname = kmem_alloc(array_numints, KM_PUSHPAGE);
boolean_t match;

zap_leaf_array_read(l, chunk, sizeof (char), array_numints,
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/zap_micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ zap_name_alloc(zap_t *zap, const char *key, matchtype_t mt)
zap_name_t *
zap_name_alloc_uint64(zap_t *zap, const uint64_t *key, int numints)
{
zap_name_t *zn = kmem_alloc(sizeof (zap_name_t), KM_SLEEP);
zap_name_t *zn = kmem_alloc(sizeof (zap_name_t), KM_PUSHPAGE);

ASSERT(zap->zap_normflags == 0);
zn->zn_zap = zap;
Expand Down

0 comments on commit cafa970

Please sign in to comment.