diff options
author | Evgeniy Polyakov <zbr@ioremap.net> | 2009-03-27 08:04:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-17 14:06:27 -0400 |
commit | 288a9a8955cd28bf6a0f48ec821cf9028e96081b (patch) | |
tree | 67d982fde2c729e00c4d17f8fe4381b143e265f4 | |
parent | f7ed550b3ecab4a14f78019ff3e8899add607f92 (diff) |
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>
-rw-r--r-- | 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 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) | |||
450 | if (err != -EEXIST) | 450 | if (err != -EEXIST) |
451 | goto err_out_put; | 451 | goto err_out_put; |
452 | } else { | 452 | } else { |
453 | struct dentry *dentry, *alias, *pd; | ||
454 | |||
453 | set_bit(NETFS_INODE_REMOTE_SYNCED, &npi->state); | 455 | set_bit(NETFS_INODE_REMOTE_SYNCED, &npi->state); |
454 | clear_bit(NETFS_INODE_OWNED, &npi->state); | 456 | clear_bit(NETFS_INODE_OWNED, &npi->state); |
457 | |||
458 | pd = d_find_alias(&parent->vfs_inode); | ||
459 | if (pd) { | ||
460 | str.hash = full_name_hash(str.name, str.len); | ||
461 | dentry = d_alloc(pd, &str); | ||
462 | if (dentry) { | ||
463 | alias = d_materialise_unique(dentry, &npi->vfs_inode); | ||
464 | if (alias) | ||
465 | dput(dentry); | ||
466 | } | ||
467 | |||
468 | dput(dentry); | ||
469 | dput(pd); | ||
470 | } | ||
455 | } | 471 | } |
456 | } | 472 | } |
457 | out: | 473 | out: |