aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 5699d4c027c..0c6d5c549d8 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);
@@ -1966,7 +1970,7 @@ out:
1966/** 1970/**
1967 * d_validate - verify dentry provided from insecure source (deprecated) 1971 * d_validate - verify dentry provided from insecure source (deprecated)
1968 * @dentry: The dentry alleged to be valid child of @dparent 1972 * @dentry: The dentry alleged to be valid child of @dparent
1969 * @dparent: The parent dentry (known to be valid) 1973 * @parent: The parent dentry (known to be valid)
1970 * 1974 *
1971 * An insecure source has sent us a dentry, here we verify it and dget() it. 1975 * An insecure source has sent us a dentry, here we verify it and dget() it.
1972 * This is used by ncpfs in its readdir implementation. 1976 * This is used by ncpfs in its readdir implementation.
@@ -2449,8 +2453,7 @@ static int prepend_name(char **buffer, int *buflen, struct qstr *name)
2449} 2453}
2450 2454
2451/** 2455/**
2452 * Prepend path string to a buffer 2456 * prepend_path - Prepend path string to a buffer
2453 *
2454 * @path: the dentry/vfsmount to report 2457 * @path: the dentry/vfsmount to report
2455 * @root: root vfsmnt/dentry (may be modified by this function) 2458 * @root: root vfsmnt/dentry (may be modified by this function)
2456 * @buffer: pointer to the end of the buffer 2459 * @buffer: pointer to the end of the buffer