In commit
808c644248e4, it will try sync() if syncfs() return error.
No evidence prove this way can work. And sync() don't return result
so make this function always return zero which cause filestore omit the
error.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
#ifdef HAVE_SYS_SYNCFS
if (syncfs(fd) == 0)
return 0;
+ else
+ return -errno;
#elif defined(SYS_syncfs)
if (syscall(SYS_syncfs, fd) == 0)
return 0;
+ else
+ return -errno;
#elif defined(__NR_syncfs)
if (syscall(__NR_syncfs, fd) == 0)
return 0;
+ else
+ return -errno;
#endif
#ifdef BTRFS_IOC_SYNC