ASSERT(PageLocked(pp));
ASSERT(!PageWriteback(pp));
-
+ ASSERT(!(current->flags & PF_NOFS));
+
+ /*
+ * Annotate this call path with a flag that indicates that it is
+ * unsafe to use KM_SLEEP during memory allocations due to the
+ * potential for a deadlock. KM_PUSHPAGE should be used instead.
+ */
+ current->flags |= PF_NOFS;
(void) zfs_putpage(mapping->host, pp, wbc);
+ current->flags &= ~PF_NOFS;
return (0);
}
.llseek = generic_file_llseek,
.read = zpl_read,
.write = zpl_write,
- .readdir = zpl_readdir,
.mmap = zpl_mmap,
.fsync = zpl_fsync,
#ifdef HAVE_FILE_FALLOCATE