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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f7ed550b3e
commit
288a9a8955
@@ -450,8 +450,24 @@ static int pohmelfs_readdir_response(struct netfs_state *st)
|
|||||||
if (err != -EEXIST)
|
if (err != -EEXIST)
|
||||||
goto err_out_put;
|
goto err_out_put;
|
||||||
} else {
|
} else {
|
||||||
|
struct dentry *dentry, *alias, *pd;
|
||||||
|
|
||||||
set_bit(NETFS_INODE_REMOTE_SYNCED, &npi->state);
|
set_bit(NETFS_INODE_REMOTE_SYNCED, &npi->state);
|
||||||
clear_bit(NETFS_INODE_OWNED, &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:
|
out:
|
||||||
|
Reference in New Issue
Block a user