You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/10/30 08:57:21 UTC

(nuttx) branch master updated: fs/inode: Change inode_unlink to static function

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 949d01be51 fs/inode: Change inode_unlink to static function
949d01be51 is described below

commit 949d01be512e1006a371744f79f5a3e21588a6b1
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Oct 29 23:54:44 2023 +0800

    fs/inode: Change inode_unlink to static function
    
    since it's only be called by inode_remove now
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 fs/inode/fs_inoderemove.c |  8 ++++++--
 fs/inode/inode.h          | 15 ---------------
 2 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/fs/inode/fs_inoderemove.c b/fs/inode/fs_inoderemove.c
index a9ce4cc0d5..1fff65c024 100644
--- a/fs/inode/fs_inoderemove.c
+++ b/fs/inode/fs_inoderemove.c
@@ -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
  *
diff --git a/fs/inode/inode.h b/fs/inode/inode.h
index 1beb665eaa..3518676765 100644
--- a/fs/inode/inode.h
+++ b/fs/inode/inode.h
@@ -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
  *