fix syncfs handling in error case
PATCH 1/1 fix syncfs handling in error case
If the call to syncfs() fails, don't try to call syncfs again via syscall(). If HAVE_SYS_SYNCFS is defined, don't use syscall() with SYS_syncfs.
Signed-off-by Danny Al-Gaaf <[email protected]>
--- src/common/sync_filesystem.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
src/common/sync_filesystem.h +1 -3
@@ -34,9 +34,7 @@ inline int sync_filesystem(int fd)#ifdef HAVE_SYS_SYNCFS if (syncfs (fd) ==0 )return 0 ; -#endif - -#ifdef SYS_syncfs +#elif defined(SYS_syncfs)if (syscall (SYS_syncfs, fd) ==0 )return 0 ;#endif
Signature · 1 line
1.8.0
Hi,
forget this patch, I'll send a new version due to changes in master.
Danny
Am 27.11.2012 16:23, schrieb Danny Al-Gaaf:
Quoted 25 lines
If the call to
syncfs()fails, don't try to call syncfs again viasyscall(). IfHAVE_SYS_SYNCFSis defined, don't usesyscall()withSYS_syncfs.Signed-off-by Danny Al-Gaaf <[email protected]>--- src/common/sync_filesystem.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)src/common/sync_filesystem.h +1
-3@@ -34,9 +34,7 @@ inline int sync_filesystem(int fd)#ifdef HAVE_SYS_SYNCFS if (syncfs (fd) ==0 )return 0 ; -#endif - -#ifdef SYS_syncfs +#elif defined(SYS_syncfs)if (syscall (SYS_syncfs, fd) ==0 )return 0 ;#endif