patch-2.1.80 linux/fs/dcache.c

Next file: linux/fs/fat/cache.c
Previous file: linux/fs/buffer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.79/linux/fs/dcache.c linux/fs/dcache.c
@@ -67,6 +67,7 @@
 	struct inode *inode = dentry->d_inode;
 	if (inode) {
 		dentry->d_inode = NULL;
+		list_del(&dentry->d_alias);
 		if (dentry->d_op && dentry->d_op->d_iput)
 			dentry->d_op->d_iput(dentry, inode);
 		else
@@ -508,6 +509,7 @@
 	INIT_LIST_HEAD(&dentry->d_hash);
 	INIT_LIST_HEAD(&dentry->d_lru);
 	INIT_LIST_HEAD(&dentry->d_subdirs);
+	INIT_LIST_HEAD(&dentry->d_alias);
 
 	dentry->d_name.name = str;
 	dentry->d_name.len = name->len;
@@ -529,6 +531,8 @@
  */
 void d_instantiate(struct dentry *entry, struct inode * inode)
 {
+	if (inode)
+		list_add(&entry->d_alias, &inode->i_dentry);
 	entry->d_inode = inode;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov