mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-02 14:23:19 +08:00
[chg][dfs]Clean up comments in dfs_elm_free_vnode
Removed unnecessary comments from dfs_elm_free_vnode function.
This commit is contained in:
@@ -1018,14 +1018,6 @@ static struct dfs_vnode *dfs_elm_create_vnode(struct dfs_dentry *dentry, int typ
|
||||
|
||||
static int dfs_elm_free_vnode(struct dfs_vnode *vnode)
|
||||
{
|
||||
/* free_vnode is the backstop destruction point: called from
|
||||
dfs_vnode_unref when ref_count drops to 0, and from dfs_vnode_destroy on
|
||||
a create/lookup failure (ref_count == 1). Normally dfs_elm_close has
|
||||
already released the resource and set data = NULL, so this is a no-op.
|
||||
It only tears down the resource when close bailed out early due to
|
||||
ref_count > 1 (a transient lookup had raised it), which is exactly the
|
||||
leak this guards against. data != NULL means the resource is still
|
||||
live and the lock is still initialized, so both are released here. */
|
||||
if (vnode && vnode->ref_count <= 1 && vnode->data != RT_NULL)
|
||||
{
|
||||
if (vnode->type == FT_DIRECTORY)
|
||||
|
||||
Reference in New Issue
Block a user