Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281987
b: refs/heads/master
c: adc0e91
h: refs/heads/master
i:
  281985: 65e64c8
  281983: 1d8411c
v: v3
  • Loading branch information
Al Viro committed Jan 10, 2012
1 parent a7ec93c commit 2151d47
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b48f03b319ba78f3abf9a7044d1f436d8d90f4f9
refs/heads/master: adc0e91ab142abe93f5b0d7980ada8a7676231fe
17 changes: 17 additions & 0 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,23 @@ struct dentry * d_alloc_root(struct inode * root_inode)
}
EXPORT_SYMBOL(d_alloc_root);

struct dentry *d_make_root(struct inode *root_inode)
{
struct dentry *res = NULL;

if (root_inode) {
static const struct qstr name = { .name = "/", .len = 1 };

res = __d_alloc(root_inode->i_sb, &name);
if (res)
d_instantiate(res, root_inode);
else
iput(root_inode);
}
return res;
}
EXPORT_SYMBOL(d_make_root);

static struct dentry * __d_find_any_alias(struct inode *inode)
{
struct dentry *alias;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/dcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ extern int d_invalidate(struct dentry *);

/* only used at mount-time */
extern struct dentry * d_alloc_root(struct inode *);
extern struct dentry * d_make_root(struct inode *);

/* <clickety>-<click> the ramfs-type tree */
extern void d_genocide(struct dentry *);
Expand Down

0 comments on commit 2151d47

Please sign in to comment.