mirror of
https://github.com/apache/nuttx.git
synced 2026-05-12 09:48:31 +08:00
nuttx/fs:Rename node with inode.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
@@ -45,11 +45,11 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void inode_release(FAR struct inode *node)
|
||||
void inode_release(FAR struct inode *inode)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (node)
|
||||
if (inode)
|
||||
{
|
||||
/* Decrement the references of the inode */
|
||||
|
||||
@@ -66,9 +66,9 @@ void inode_release(FAR struct inode *node)
|
||||
}
|
||||
while (ret < 0);
|
||||
|
||||
if (node->i_crefs)
|
||||
if (inode->i_crefs)
|
||||
{
|
||||
node->i_crefs--;
|
||||
inode->i_crefs--;
|
||||
}
|
||||
|
||||
/* If the subtree was previously deleted and the reference
|
||||
@@ -76,7 +76,7 @@ void inode_release(FAR struct inode *node)
|
||||
* now.
|
||||
*/
|
||||
|
||||
if (node->i_crefs <= 0 && (node->i_flags & FSNODEFLAG_DELETED) != 0)
|
||||
if (inode->i_crefs <= 0 && (inode->i_flags & FSNODEFLAG_DELETED) != 0)
|
||||
{
|
||||
/* If the inode has been properly unlinked, then the peer pointer
|
||||
* should be NULL.
|
||||
@@ -84,8 +84,8 @@ void inode_release(FAR struct inode *node)
|
||||
|
||||
inode_unlock();
|
||||
|
||||
DEBUGASSERT(node->i_peer == NULL);
|
||||
inode_free(node);
|
||||
DEBUGASSERT(inode->i_peer == NULL);
|
||||
inode_free(inode);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user