Abhishekmishra2808 commented on code in PR #19585:
URL: https://github.com/apache/nuttx/pull/19585#discussion_r3695653839
##########
fs/vfs/fs_open.c:
##########
@@ -172,7 +172,19 @@ static int file_vopen(FAR struct file *filep, FAR const
char *path,
/* Validate operation support and pseudo-filesystem permissions */
- ret = inode_checkopenperm(inode, oflags);
+#ifndef CONFIG_DISABLE_MOUNTPOINT
+ if (INODE_IS_MOUNTPT(inode))
+ {
+ ret = inode_checkopenperm(inode, oflags);
+ }
+ else
+#endif
+ {
+ inode_rlock();
Review Comment:
Added `inode_rlock()` only for non-mountpoint inodes around the pseudo open
permission check. Mountpoints skip it because inode_checkperm() already exempts
mountpoints from pseudo mode checks.
--
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]