[systemd-devel] [PATCH] names: take the registry write lock in kdbus_name_release()

David Herrmann dh.herrmann at gmail.com
Fri Apr 18 12:55:30 PDT 2014


Hi

On Fri, Apr 18, 2014 at 3:16 AM, Djalal Harouni <tixxdz at opendz.org> wrote:
> Take the write lock in kdbus_name_release() instead of
> kdbus_cmd_name_release() in order to reduce the lock hold time.
>
> This change permits to convert the kdbus_bus_find_conn_by_id() call to
> kdbus_conn_find_peer() since the bus lock will also be taken later in
> kdbus_name_release().
>
> Another advantage is that now kdbus_cmd_name_release() and
> kdbus_name_release() have the same semantic of kdbus_cmd_name_acquire()
> and kdbus_name_acquire()
>
> Signed-off-by: Djalal Harouni <tixxdz at opendz.org>

Looks good to me.

Thanks
David


More information about the systemd-devel mailing list