Abhishekmishra2808 commented on code in PR #19900:
URL: https://github.com/apache/nuttx/pull/19900#discussion_r3919008268


##########
fs/driver/fs_findblockdriver.c:
##########
@@ -77,20 +77,20 @@ int find_blockdriver(FAR const char *pathname, int 
mountflags,
 
   /* Find the inode registered with this pathname */
 
-  SETUP_SEARCH(&desc, pathname, false);
+  ret = inode_search_setup(&desc, pathname, false);
+  if (ret < 0)
+    {
+      return ret;
+    }
 
-  ret = inode_find(&desc);
+  ret = inode_find(&desc, &inode);
   if (ret < 0)
     {
       ferr("ERROR: Failed to find %s\n", pathname);
       ret = -ENOENT;

Review Comment:
   Fixed



##########
fs/driver/fs_findmtddriver.c:
##########
@@ -70,20 +70,20 @@ int find_mtddriver(FAR const char *pathname, FAR struct 
inode **ppinode)
 
   /* Find the inode registered with this pathname */
 
-  SETUP_SEARCH(&desc, pathname, false);
+  ret = inode_search_setup(&desc, pathname, false);
+  if (ret < 0)
+    {
+      return ret;
+    }
 
-  ret = inode_find(&desc);
+  ret = inode_find(&desc, &inode);
   if (ret < 0)
     {
       ferr("ERROR: Failed to find %s\n", pathname);
       ret = -ENOENT;

Review Comment:
   Fixed



##########
fs/inode/fs_inodefind.c:
##########
@@ -58,17 +58,16 @@ int inode_find(FAR struct inode_search_s *desc)
    */
 
   inode_rlock();
-  ret = inode_search(desc);
+  ret = inode_search(desc, inode);
   if (ret >= 0)

Review Comment:
   Fixed



##########
fs/vfs/fs_symlink.c:
##########
@@ -94,9 +94,14 @@ int symlink(FAR const char *path1, FAR const char *path2)
    * 'path2' does not lie on a mounted volume.
    */
 
-  SETUP_SEARCH(&desc, path2, false);
+  ret = inode_search_setup(&desc, path2, false);
+  if (ret < 0)
+    {
+      errcode = -ret;

Review Comment:
   Fixed



##########
fs/vfs/fs_symlink.c:
##########
@@ -106,13 +111,13 @@ int symlink(FAR const char *path1, FAR const char *path2)
 #ifndef CONFIG_DISABLE_MOUNTPOINT
       /* Check if the inode is a mountpoint. */
 
-      DEBUGASSERT(desc.node != NULL);
-      if (INODE_IS_MOUNTPT(desc.node))
+      DEBUGASSERT(inode != NULL);
+      if (INODE_IS_MOUNTPT(inode))
         {
-          if (desc.node->u.i_mops && desc.node->u.i_mops->symlink)
+          if (inode->u.i_mops && inode->u.i_mops->symlink)
             {
-              ret = desc.node->u.i_mops->symlink(desc.node, path1,
-                                                 desc.relpath);
+              ret = inode->u.i_mops->symlink(inode, path1,
+                                            desc.relpath);

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to