kdbus: queue: fix memory leak in entry memfd

when freeing a queue entry if memfd are passed they were not release when
freeing entry from queue.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Revert "fs: restructure fs_dir_fop_iterate() a little"

This reverts commit f5a272c36affe1922d64bcfb803f44b26935f885.

This commit introduced a race condition when dir_emit() returns true.
We have to sync up every time ctx->pos mismatches next->hash.
match: convert the entries-lock into a read-write lock

The match db is per connection and is only writable by that connection,
in the other hand we have many concurrent lookups that are performed by
the bus triggered when every connection sends a broadcast message

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
match: remove the first underscore from __kdbus_match_db_remove_unlocked() name

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Changelog updates

Signed-off-by: Daniel Mack <daniel@zonque.org>
fs: move fs_inode_get()

Move fs_inode_get() some blocks up so we can drop the static
forward decl.

Signed-off-by: Daniel Mack <daniel@zonque.org>
node: simplify destructor

Use a static copy of the node instead of copying each field into a
temporary variable. We can then cleanup the static fields after the
destructor was called.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Revert "fs: move fs_inode_get()"

This reverts commit 4c63af939749b1afe4a1a83503ca5f66bae48fac. It breaks
the build. We need some forward declarations. Keeping inode_get() as
forward-declaration is the easiest.
fs: drop fops forwarding

The cdev handling is now dropped, hence, handle.c can rely on being called
from kdbusfs. inode->i_private stores the kdbus_node pointer so we can
access it directly.

Drop the fops forwarding in ->open() and directly call into handle_ops.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
match: minor fix and cleaning for kdbus_match_db_add()

Use kdbus_name_is_valid() to validate the well-known name, and some code
cleanups, this is just a first round, further patches will try to
improve the logic of this function.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>