fs_fsync: should not call fs's ioctl when fs not support sync api
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
This commit is contained in:
parent
279667a8f5
commit
7117d3ea8a
@ -64,12 +64,14 @@ int file_fsync(FAR struct file *filep)
|
||||
if (inode != NULL)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||
if (INODE_IS_MOUNTPT(inode) && inode->u.i_mops &&
|
||||
inode->u.i_mops->sync)
|
||||
if (INODE_IS_MOUNTPT(inode))
|
||||
{
|
||||
/* Yes, then tell the mountpoint to sync this file */
|
||||
if (inode->u.i_mops && inode->u.i_mops->sync)
|
||||
{
|
||||
/* Yes, then tell the mountpoint to sync this file */
|
||||
|
||||
return inode->u.i_mops->sync(filep);
|
||||
return inode->u.i_mops->sync(filep);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user