net/mlx4_core: Avoid returning success in case of an error flow
[cascardo/linux.git] / fs / sync.c
index 4ec430a..dd5d171 100644 (file)
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -348,7 +348,8 @@ SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes,
        }
 
        if (flags & SYNC_FILE_RANGE_WRITE) {
-               ret = filemap_fdatawrite_range(mapping, offset, endbyte);
+               ret = __filemap_fdatawrite_range(mapping, offset, endbyte,
+                                                WB_SYNC_NONE);
                if (ret < 0)
                        goto out_put;
        }