null node pointers.
Dragonfly-bug: Still 1726 (tmpfs malloc limit exceeded).
if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max)
return (ENOSPC);
- nnode = (struct tmpfs_node *)objcache_get(tmp->tm_node_pool, M_WAITOK);
+ nnode = objcache_get(tmp->tm_node_pool, M_WAITOK | M_NULLOK);
+ if (nnode == NULL)
+ return (ENOSPC);
/* Generic initialization. */
nnode->tn_type = type;
tmpfs_node_init(void *args, int flags)
{
struct tmpfs_node *node = (struct tmpfs_node *)objcache_malloc_alloc(args, flags);
+ if (node == NULL)
+ return (NULL);
node->tn_id = 0;
lockinit(&node->tn_interlock, "tmpfs node interlock", 0, LK_CANRECURSE);