ino_nr = m_in->m_vfs_fs_putnode.inode;
count = m_in->m_vfs_fs_putnode.count;
- if (fdp->fdr_putnode == NULL)
- return ENOSYS;
-
if (count == 0 || count > INT_MAX) {
printf("fsdriver: invalid reference count\n");
return EINVAL;
}
- return fdp->fdr_putnode(ino_nr, count);
+ if (fdp->fdr_putnode != NULL)
+ return fdp->fdr_putnode(ino_nr, count);
+ else
+ return OK;
}
/*
else
r = ELOOP;
- fdp->fdr_putnode(next_node.fn_ino_nr, 1);
+ if (fdp->fdr_putnode != NULL)
+ fdp->fdr_putnode(next_node.fn_ino_nr, 1);
if (r != OK)
break;
}
/* We have found a new node. Continue from this node. */
- fdp->fdr_putnode(cur_node.fn_ino_nr, 1);
+ if (fdp->fdr_putnode != NULL)
+ fdp->fdr_putnode(cur_node.fn_ino_nr, 1);
cur_node = next_node;
m_out->m_fs_vfs_lookup.uid = cur_node.fn_uid;
m_out->m_fs_vfs_lookup.gid = cur_node.fn_gid;
m_out->m_fs_vfs_lookup.device = cur_node.fn_dev;
- } else
+ } else if (fdp->fdr_putnode != NULL)
fdp->fdr_putnode(cur_node.fn_ino_nr, 1);
return r;