diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-12-18 10:22:30 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-12 20:02:34 -0500 |
commit | c8aebb0c9f8c7471643d5f8ba68328de8013005f (patch) | |
tree | fae492892b9eecaf9c42632dd1203102cc69365a | |
parent | 4162cf64973df51fc885825bc9ca4d055891c49f (diff) | |
download | op-kernel-dev-c8aebb0c9f8c7471643d5f8ba68328de8013005f.zip op-kernel-dev-c8aebb0c9f8c7471643d5f8ba68328de8013005f.tar.gz |
per-superblock default ->d_op
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/dcache.c | 4 | ||||
-rw-r--r-- | include/linux/fs.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 5699d4c..5ec5826 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1320,6 +1320,7 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name) __dget_dlock(parent); dentry->d_parent = parent; dentry->d_sb = parent->d_sb; + d_set_d_op(dentry, dentry->d_sb->s_d_op); list_add(&dentry->d_u.d_child, &parent->d_subdirs); spin_unlock(&parent->d_lock); } @@ -1335,6 +1336,7 @@ struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name) struct dentry *dentry = d_alloc(NULL, name); if (dentry) { dentry->d_sb = sb; + d_set_d_op(dentry, dentry->d_sb->s_d_op); dentry->d_parent = dentry; dentry->d_flags |= DCACHE_DISCONNECTED; } @@ -1507,6 +1509,7 @@ struct dentry * d_alloc_root(struct inode * root_inode) res = d_alloc(NULL, &name); if (res) { res->d_sb = root_inode->i_sb; + d_set_d_op(res, res->d_sb->s_d_op); res->d_parent = res; d_instantiate(res, root_inode); } @@ -1567,6 +1570,7 @@ struct dentry *d_obtain_alias(struct inode *inode) /* attach a disconnected dentry */ spin_lock(&tmp->d_lock); tmp->d_sb = inode->i_sb; + d_set_d_op(tmp, tmp->d_sb->s_d_op); tmp->d_inode = inode; tmp->d_flags |= DCACHE_DISCONNECTED; list_add(&tmp->d_alias, &inode->i_dentry); diff --git a/include/linux/fs.h b/include/linux/fs.h index f84d992..3e4c274 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1423,6 +1423,7 @@ struct super_block { * generic_show_options() */ char __rcu *s_options; + const struct dentry_operations *s_d_op; /* default d_op for dentries */ }; extern struct timespec current_fs_time(struct super_block *sb); |