参照元†
- struct inode *inode
 
- struct file *file
 
返り値†
static int dma_buf_release(struct inode *inode, struct file *file)
{
        struct dma_buf *dmabuf;
        if (!is_dma_buf_file(file))
                return -EINVAL;
        dmabuf = file->private_data;
        BUG_ON(dmabuf->vmapping_counter);
        /*
         * Any fences that a dma-buf poll can wait on should be signaled
         * before releasing dma-buf. This is the responsibility of each
         * driver that uses the reservation objects.
         *
         * If you hit this BUG() it means someone dropped their ref to the
         * dma-buf while still having pending operation to the buffer.
         */
        BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active);
- dmabuf->cb_shared は  型
 
- dmabuf->cb_excl は  型
 
- [[linux-4.4.1/]]
 
        dmabuf->ops->release(dmabuf);
        mutex_lock(&db_list.lock);
        list_del(&dmabuf->list_node);
        mutex_unlock(&db_list.lock);
        if (dmabuf->resv == (struct reservation_object *)&dmabuf[1])
                reservation_object_fini(dmabuf->resv);
        module_put(dmabuf->owner);
        kfree(dmabuf);
        return 0;
}
コメント†