summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sys/zfs_context.h1
-rw-r--r--module/zfs/zfs_vnops.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index 98b216fd7..8982c000b 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -391,6 +391,7 @@ typedef struct taskq_ent {
#define TQ_SLEEP KM_SLEEP /* Can block for memory */
#define TQ_NOSLEEP KM_NOSLEEP /* cannot block for memory; may fail */
+#define TQ_PUSHPAGE KM_PUSHPAGE /* Cannot perform I/O */
#define TQ_NOQUEUE 0x02 /* Do not enqueue if can't dispatch */
#define TQ_FRONT 0x08 /* Queue in front */
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
index 755d0575a..75614340f 100644
--- a/module/zfs/zfs_vnops.c
+++ b/module/zfs/zfs_vnops.c
@@ -868,7 +868,7 @@ iput_async(struct inode *ip, taskq_t *taskq)
{
ASSERT(atomic_read(&ip->i_count) > 0);
if (atomic_read(&ip->i_count) == 1)
- taskq_dispatch(taskq, (task_func_t *)iput, ip, TQ_SLEEP);
+ taskq_dispatch(taskq, (task_func_t *)iput, ip, TQ_PUSHPAGE);
else
iput(ip);
}
@@ -934,7 +934,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
return (ENOENT);
}
- zgd = (zgd_t *)kmem_zalloc(sizeof (zgd_t), KM_SLEEP);
+ zgd = (zgd_t *)kmem_zalloc(sizeof (zgd_t), KM_PUSHPAGE);
zgd->zgd_zilog = zsb->z_log;
zgd->zgd_private = zp;