From: Evgeniy Polyakov Date: Fri, 27 Mar 2009 12:04:18 +0000 (+0300) Subject: Staging: pohmelfs: Populate dentry cache when receiving the new readdir entry. X-Git-Tag: MMI-PSA29.97-13-9~28415^2~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=288a9a8955cd28bf6a0f48ec821cf9028e96081b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: pohmelfs: Populate dentry cache when receiving the new readdir entry. Signed-off-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/pohmelfs/net.c b/drivers/staging/pohmelfs/net.c index c9b8540c1efe..93a5921c36f4 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: