git: sys/vfs/hammer: Rename btree_set_parent() to btree_set_parent_of_child()

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Fri Sep 4 10:57:33 PDT 2015


commit 90f96c37cef6a728ca117f4360da5336d6208ef1
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Fri Sep 4 02:15:17 2015 +0900

    sys/vfs/hammer: Rename btree_set_parent() to btree_set_parent_of_child()
    
    This commit renames btree_set_parent() to btree_set_parent_of_child()
    since btree_set_parent() is counter-intuitive.
    
    1. btree_get_parent(node)
    returns node's parent, but
    2. btree_set_parent(node, elm)
    sets its child's parent to node instead of setting node's parent
    to something, which isn't quite expected behavior from the way
    these two functions are named.

Summary of changes:
 sys/vfs/hammer/hammer.h         | 3 ++-
 sys/vfs/hammer/hammer_btree.c   | 4 ++--
 sys/vfs/hammer/hammer_reblock.c | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/90f96c37cef6a728ca117f4360da5336d6208ef1


-- 
DragonFly BSD source repository



More information about the Commits mailing list