mirror of
https://github.com/apache/nuttx.git
synced 2026-08-08 22:17:18 +00:00
nuttx/fs:Rename node with inode.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
29e50ebed8
commit
71d10bd8cf
1 changed files with 7 additions and 7 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue