Staging: pohmelfs: Populate dentry cache when receiving the new readdir entry.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 17, 2009 - 3:03 pm

Gitweb:     http://git.kernel.org/linus/288a9a8955cd28bf6a0f48ec821cf9028e96081b
Commit:     288a9a8955cd28bf6a0f48ec821cf9028e96081b
Parent:     f7ed550b3ecab4a14f78019ff3e8899add607f92
Author:     Evgeniy Polyakov <zbr@ioremap.net>
AuthorDate: Fri Mar 27 15:04:18 2009 +0300
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Fri Apr 17 11:06:27 2009 -0700

    Staging: pohmelfs: Populate dentry cache when receiving the new readdir entry.
    
    Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/pohmelfs/net.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/pohmelfs/net.c b/drivers/staging/pohmelfs/net.c
index c9b8540..93a5921 100644
--- a/drivers/staging/pohmelfs/net.c
+++ b/drivers/staging/pohmelfs/net.c
@@ -450,8 +450,24 @@ static int pohmelfs_readdir_response(struct netfs_state *st)
 			if (err != -EEXIST)
 				goto err_out_put;
 		} else {
+			struct dentry *dentry, *alias, *pd;
+
 			set_bit(NETFS_INODE_REMOTE_SYNCED, &npi->state);
 			clear_bit(NETFS_INODE_OWNED, &npi->state);
+
+			pd = d_find_alias(&parent->vfs_inode);
+			if (pd) {
+				str.hash = full_name_hash(str.name, str.len);
+				dentry = d_alloc(pd, &str);
+				if (dentry) {
+					alias = d_materialise_unique(dentry, &npi->vfs_inode);
+					if (alias)
+						dput(dentry);
+				}
+
+				dput(dentry);
+				dput(pd);
+			}
 		}
 	}
 out:
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Staging: pohmelfs: Populate dentry cache when receiving th ..., Linux Kernel Mailing ..., (Fri Apr 17, 3:03 pm)