Loading drivers/dma-buf/dma-buf.c +17 −4 Original line number Original line Diff line number Diff line Loading @@ -124,10 +124,6 @@ static void dma_buf_release(struct dentry *dentry) */ */ BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active); BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active); mutex_lock(&db_list.lock); list_del(&dmabuf->list_node); mutex_unlock(&db_list.lock); if (dmabuf->dtor) if (dmabuf->dtor) dtor_ret = dmabuf->dtor(dmabuf, dmabuf->dtor_data); dtor_ret = dmabuf->dtor(dmabuf, dmabuf->dtor_data); Loading @@ -146,6 +142,22 @@ static void dma_buf_release(struct dentry *dentry) dmabuf_dent_put(dmabuf); dmabuf_dent_put(dmabuf); } } static int dma_buf_file_release(struct inode *inode, struct file *file) { struct dma_buf *dmabuf; if (!is_dma_buf_file(file)) return -EINVAL; dmabuf = file->private_data; mutex_lock(&db_list.lock); list_del(&dmabuf->list_node); mutex_unlock(&db_list.lock); return 0; } static const struct dentry_operations dma_buf_dentry_ops = { static const struct dentry_operations dma_buf_dentry_ops = { .d_dname = dmabuffs_dname, .d_dname = dmabuffs_dname, .d_release = dma_buf_release, .d_release = dma_buf_release, Loading Loading @@ -484,6 +496,7 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file) } } static const struct file_operations dma_buf_fops = { static const struct file_operations dma_buf_fops = { .release = dma_buf_file_release, .mmap = dma_buf_mmap_internal, .mmap = dma_buf_mmap_internal, .llseek = dma_buf_llseek, .llseek = dma_buf_llseek, .poll = dma_buf_poll, .poll = dma_buf_poll, Loading Loading
drivers/dma-buf/dma-buf.c +17 −4 Original line number Original line Diff line number Diff line Loading @@ -124,10 +124,6 @@ static void dma_buf_release(struct dentry *dentry) */ */ BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active); BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active); mutex_lock(&db_list.lock); list_del(&dmabuf->list_node); mutex_unlock(&db_list.lock); if (dmabuf->dtor) if (dmabuf->dtor) dtor_ret = dmabuf->dtor(dmabuf, dmabuf->dtor_data); dtor_ret = dmabuf->dtor(dmabuf, dmabuf->dtor_data); Loading @@ -146,6 +142,22 @@ static void dma_buf_release(struct dentry *dentry) dmabuf_dent_put(dmabuf); dmabuf_dent_put(dmabuf); } } static int dma_buf_file_release(struct inode *inode, struct file *file) { struct dma_buf *dmabuf; if (!is_dma_buf_file(file)) return -EINVAL; dmabuf = file->private_data; mutex_lock(&db_list.lock); list_del(&dmabuf->list_node); mutex_unlock(&db_list.lock); return 0; } static const struct dentry_operations dma_buf_dentry_ops = { static const struct dentry_operations dma_buf_dentry_ops = { .d_dname = dmabuffs_dname, .d_dname = dmabuffs_dname, .d_release = dma_buf_release, .d_release = dma_buf_release, Loading Loading @@ -484,6 +496,7 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file) } } static const struct file_operations dma_buf_fops = { static const struct file_operations dma_buf_fops = { .release = dma_buf_file_release, .mmap = dma_buf_mmap_internal, .mmap = dma_buf_mmap_internal, .llseek = dma_buf_llseek, .llseek = dma_buf_llseek, .poll = dma_buf_poll, .poll = dma_buf_poll, Loading