git: sys/vfs/hammer: Don't use HAMMER_CURSOR_GET_LEAF

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Mar 5 03:54:54 PST 2016


commit cf977f11346cb0bcae56d092359a0774a5dc4d61
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Wed Mar 2 02:29:09 2016 +0900

    sys/vfs/hammer: Don't use HAMMER_CURSOR_GET_LEAF
    
    HAMMER_CURSOR_GET_LEAF is not used by the current implementation
    of hammer_btree_extract(), since this function will cause
    cursor->leaf to point to the node element in question regardless
    of the flag value. Then just don't use this flag when calling
    hammer_btree_extract() when we know loading node element (leaf)
    is the default behavior.
    
    The cursor flag is already complicated enough, so simplifying
    btree extract callers by either passing 0 or DATA but not LEAF
    makes things a bit more clear.

Summary of changes:
 sys/vfs/hammer/hammer.h        | 8 ++------
 sys/vfs/hammer/hammer_cursor.h | 2 +-
 sys/vfs/hammer/hammer_inode.c  | 6 ++----
 3 files changed, 5 insertions(+), 11 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cf977f11346cb0bcae56d092359a0774a5dc4d61


-- 
DragonFly BSD source repository



More information about the Commits mailing list