Skip to content

Commit

Permalink
Staging: pohmelfs: Populate dentry cache when receiving the new readd…
Browse files Browse the repository at this point in the history
…ir entry.

Signed-off-by: Evgeniy Polyakov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
bioothod authored and gregkh committed Apr 17, 2009
1 parent f7ed550 commit 288a9a8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/staging/pohmelfs/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 288a9a8

Please sign in to comment.