aboutsummaryrefslogtreecommitdiffstats
path: root/fs/internal.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-07 15:03:58 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 01:44:17 -0400
commita4464dbc0ca6a3ab8e9d1206bc05059dae2a559d (patch)
treed3c9332ab72cf5a4eba483ba1ff83c54ca4c42a0 /fs/internal.h
parente3c3d9c838d48c0341c40ea45ee087e3d8c8ea39 (diff)
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/internal.h')
-rw-r--r--fs/internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/internal.h b/fs/internal.h
index b29c46e4e32..ae47c48bedd 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -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 *);