fs/inode: Change inode_unlink to static function

since it's only be called by inode_remove now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-10-29 23:54:44 +08:00 committed by Petro Karashchenko
parent 5b87fdfb9d
commit 949d01be51
2 changed files with 6 additions and 17 deletions

View File

@ -33,7 +33,7 @@
#include "inode/inode.h"
/****************************************************************************
* Public Functions
* Private Functions
****************************************************************************/
/****************************************************************************
@ -54,7 +54,7 @@
*
****************************************************************************/
FAR struct inode *inode_unlink(FAR const char *path)
static FAR struct inode *inode_unlink(FAR const char *path)
{
struct inode_search_s desc;
FAR struct inode *node = NULL;
@ -102,6 +102,10 @@ FAR struct inode *inode_unlink(FAR const char *path)
return node;
}
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: inode_remove
*

View File

@ -328,21 +328,6 @@ void inode_root_reserve(void);
int inode_reserve(FAR const char *path,
mode_t mode, FAR struct inode **inode);
/****************************************************************************
* Name: inode_unlink
*
* Description:
* Given a path, remove a the node from the in-memory, inode tree that the
* path refers to. This is normally done in preparation to removing or
* moving an inode.
*
* Assumptions/Limitations:
* The caller must hold the inode semaphore
*
****************************************************************************/
FAR struct inode *inode_unlink(FAR const char *path);
/****************************************************************************
* Name: inode_remove
*