pkarashchenko commented on a change in pull request #5224:
URL: https://github.com/apache/incubator-nuttx/pull/5224#discussion_r784620923



##########
File path: fs/vfs/fs_fsync.c
##########
@@ -55,13 +55,6 @@ int file_fsync(FAR struct file *filep)
 {
   struct inode *inode;
 
-  /* Was this file opened for write access? */
-
-  if ((filep->f_oflags & O_WROK) == 0)

Review comment:
       What is the point of `fsync` in case if file is not open for write? 
Maybe reasonable just return `OK` in this case instead of removing check? I 
mean that we really do not need to calll `inode->​u​.​i_mops​->​sync​` if file 
is not open for writing.




-- 
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