MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dfs_dentry_insert

Function dfs_dentry_insert

components/dfs/dfs_v2/src/dfs_dentry.c:258–264  ·  view source on GitHub ↗

* @brief Insert a directory entry (dentry) into the hash table * * @param[in,out] dentry Pointer to the directory entry to be inserted */

Source from the content-addressed store, hash-verified

256 * @param[in,out] dentry Pointer to the directory entry to be inserted
257 */
258void dfs_dentry_insert(struct dfs_dentry *dentry)
259{
260 dfs_file_lock();
261 rt_list_insert_after(&hash_head.head[_dentry_hash(dentry->mnt, dentry->pathname)], &dentry->hashlist);
262 dentry->flags |= DENTRY_IS_ADDHASH;
263 dfs_file_unlock();
264}
265
266/**
267 * @brief Look up a directory entry (dentry) in the filesystem

Callers 1

dfs_file_openFunction · 0.85

Calls 4

rt_list_insert_afterFunction · 0.85
_dentry_hashFunction · 0.85
dfs_file_lockFunction · 0.70
dfs_file_unlockFunction · 0.70

Tested by

no test coverage detected