Abhishekmishra2808 commented on code in PR #19900:
URL: https://github.com/apache/nuttx/pull/19900#discussion_r3968494385
##########
fs/vfs/fs_open.c:
##########
@@ -100,7 +100,12 @@ static int file_vopen(FAR struct file *filep, FAR const
char *path,
/* Get an inode for this file */
- SETUP_SEARCH(&desc, path, (oflags & O_NOFOLLOW) != 0);
+ ret = inode_search_setup(&desc, path, (oflags & O_NOFOLLOW) != 0);
+ if (ret < 0)
+ {
+ inode_search_release(&desc);
Review Comment:
Fixed in latest push.
##########
fs/vfs/fs_mkdir.c:
##########
@@ -71,7 +71,12 @@ int mkdir(const char *pathname, mode_t mode)
/* Find the inode that includes this path */
- SETUP_SEARCH(&desc, pathname, false);
+ ret = inode_search_setup(&desc, pathname, false);
+ if (ret < 0)
+ {
+ errcode = -ret;
+ goto errout_with_search;
Review Comment:
Fixed in latest push.
##########
fs/vfs/fs_mkdir.c:
##########
@@ -71,7 +71,12 @@ int mkdir(const char *pathname, mode_t mode)
/* Find the inode that includes this path */
- SETUP_SEARCH(&desc, pathname, false);
+ ret = inode_search_setup(&desc, pathname, false);
+ if (ret < 0)
+ {
+ errcode = -ret;
Review Comment:
Fixed in latest push.
##########
fs/vfs/fs_link.c:
##########
@@ -95,7 +95,13 @@ int link(FAR const char *path1, FAR const char *path2)
goto errout;
}
- SETUP_SEARCH(&desc_path1, path1, false);
+ ret = inode_search_setup(&desc_path1, path1, false);
+ if (ret < 0)
+ {
+ errcode = -ret;
Review Comment:
Fixed in latest push.
##########
fs/vfs/fs_chstat.c:
##########
@@ -54,7 +54,12 @@ static int chstat_recursive(FAR const char *path,
/* Get an inode for this path */
- SETUP_SEARCH(&desc, path, true);
+ ret = inode_search_setup(&desc, path, true);
+ if (ret < 0)
+ {
+ inode_search_release(&desc);
Review Comment:
Fixed in latest push.
##########
fs/unionfs/fs_unionfs.c:
##########
@@ -2538,7 +2538,12 @@ static int unionfs_getmount(FAR const char *path, FAR
struct inode **inode)
/* Find the mountpt */
- SETUP_SEARCH(&desc, path, false);
+ ret = inode_search_setup(&desc, path, false);
+ if (ret < 0)
+ {
+ inode_search_release(&desc);
Review Comment:
Fixed in latest push.
--
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]