• A
    Make ->d_sb assign-once and always non-NULL · a4464dbc
    Al Viro 提交于
    New helper (non-exported, fs/internal.h-only): __d_alloc(sb, name).
    Allocates dentry, sets its ->d_sb to given superblock and sets
    ->d_op accordingly.  Old d_alloc(NULL, name) callers are converted
    to that (all of them know what superblock they want).  d_alloc()
    itself is left only for parent != NULl case; uses __d_alloc(),
    inserts result into the list of parent's children.
    
    Note that now ->d_sb is assign-once and never NULL *and*
    ->d_parent is never NULL either.
    Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
    a4464dbc
libfs.c 25.3 KB