mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Make ->d_sb assign-once and always non-NULL
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: Al Viro <[email protected]>
This commit is contained in:
parent
e3c3d9c838
commit
a4464dbc0c
3 changed files with 47 additions and 39 deletions
|
|
@ -135,3 +135,8 @@ extern void inode_wb_list_del(struct inode *inode);
|
|||
extern int get_nr_dirty_inodes(void);
|
||||
extern void evict_inodes(struct super_block *);
|
||||
extern int invalidate_inodes(struct super_block *, bool);
|
||||
|
||||
/*
|
||||
* dcache.c
|
||||
*/
|
||||
extern struct dentry *__d_alloc(struct super_block *, const struct qstr *);
|
||||
|
|
|
|||
Loading…
Reference in a new issue