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 /fs/dcache.c | |
parent | 4162cf64973df51fc885825bc9ca4d055891c49f (diff) |
per-superblock default ->d_op
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 5699d4c027cb..5ec58267b5bb 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -1320,6 +1320,7 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name) | |||
1320 | __dget_dlock(parent); | 1320 | __dget_dlock(parent); |
1321 | dentry->d_parent = parent; | 1321 | dentry->d_parent = parent; |
1322 | dentry->d_sb = parent->d_sb; | 1322 | dentry->d_sb = parent->d_sb; |
1323 | d_set_d_op(dentry, dentry->d_sb->s_d_op); | ||
1323 | list_add(&dentry->d_u.d_child, &parent->d_subdirs); | 1324 | list_add(&dentry->d_u.d_child, &parent->d_subdirs); |
1324 | spin_unlock(&parent->d_lock); | 1325 | spin_unlock(&parent->d_lock); |
1325 | } | 1326 | } |
@@ -1335,6 +1336,7 @@ struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name) | |||
1335 | struct dentry *dentry = d_alloc(NULL, name); | 1336 | struct dentry *dentry = d_alloc(NULL, name); |
1336 | if (dentry) { | 1337 | if (dentry) { |
1337 | dentry->d_sb = sb; | 1338 | dentry->d_sb = sb; |
1339 | d_set_d_op(dentry, dentry->d_sb->s_d_op); | ||
1338 | dentry->d_parent = dentry; | 1340 | dentry->d_parent = dentry; |
1339 | dentry->d_flags |= DCACHE_DISCONNECTED; | 1341 | dentry->d_flags |= DCACHE_DISCONNECTED; |
1340 | } | 1342 | } |
@@ -1507,6 +1509,7 @@ struct dentry * d_alloc_root(struct inode * root_inode) | |||
1507 | res = d_alloc(NULL, &name); | 1509 | res = d_alloc(NULL, &name); |
1508 | if (res) { | 1510 | if (res) { |
1509 | res->d_sb = root_inode->i_sb; | 1511 | res->d_sb = root_inode->i_sb; |
1512 | d_set_d_op(res, res->d_sb->s_d_op); | ||
1510 | res->d_parent = res; | 1513 | res->d_parent = res; |
1511 | d_instantiate(res, root_inode); | 1514 | d_instantiate(res, root_inode); |
1512 | } | 1515 | } |
@@ -1567,6 +1570,7 @@ struct dentry *d_obtain_alias(struct inode *inode) | |||
1567 | /* attach a disconnected dentry */ | 1570 | /* attach a disconnected dentry */ |
1568 | spin_lock(&tmp->d_lock); | 1571 | spin_lock(&tmp->d_lock); |
1569 | tmp->d_sb = inode->i_sb; | 1572 | tmp->d_sb = inode->i_sb; |
1573 | d_set_d_op(tmp, tmp->d_sb->s_d_op); | ||
1570 | tmp->d_inode = inode; | 1574 | tmp->d_inode = inode; |
1571 | tmp->d_flags |= DCACHE_DISCONNECTED; | 1575 | tmp->d_flags |= DCACHE_DISCONNECTED; |
1572 | list_add(&tmp->d_alias, &inode->i_dentry); | 1576 | list_add(&tmp->d_alias, &inode->i_dentry); |