git: sys/dev/disk/dm: Fix device counter handling

Tomohiro Kusumi tkusumi at
Thu Nov 12 07:09:37 PST 2015

commit 3472ce2b8a1bca797802d433bbd411a9aa5f7ac2
Author: Tomohiro Kusumi <kusumi.tomohiro at>
Date:   Tue Nov 10 21:57:14 2015 +0900

    sys/dev/disk/dm: Fix device counter handling
    dm_dev_list and its element counter dm_dev_counter should be
    protected by the same lock dm_dev_mutex. Having these updated
    separately makes code logic more complex than it should.
    If dm_dev_counter is protected by dm_dev_mutex, then no need
    to care if dm_dev_counter++/-- are atomic or not.

Summary of changes:
 sys/dev/disk/dm/dm_dev.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list